Medium

Bagisto has HTML Filter Bypass that Enables Stored XSS

  • Disclosed: 02.01.2026
  • Updated: 11.10.2026 10:22

Summary

A stored Cross-Site Scripting (XSS) vulnerability exists in Bagisto 2.3.8 within the CMS page editor. Although the platform normally attempts to sanitize <script> tags, the filtering can be bypassed by manipulating the raw HTTP POST request before submission. As a result, arbitrary JavaScript can be stored in the CMS content and executed whenever the page is viewed or edited. This exposes administrators to a high-severity risk, including complete account takeover, backend hijacking, and malicious script execution.

Details

Bagisto’s CMS editor includes an HTML sanitation mechanism intended to protect against script injection by wrapping raw script content in <div> elements. However, this mechanism is applied only to requests submitted through the UI. When the CMS update request is intercepted and modified at the HTTP level, the sanitation layer fails to strip or encode embedded <script> tags.

Because the back-end trusts the manipulated request, the malicious script is stored in the database exactly as submitted. When an administrator opens the CMS page (either in the editor or in the storefront), the JavaScript executes in the browser context with full admin privileges.

The vulnerability stems from insufficient server-side sanitization. Sanitization logic appears to rely on client-side or UI-layer controls, leaving the underlying HTTP endpoint unprotected.

PoC

  • A Bagisto 2.3.8 installation with access to the admin panel
  • Ability to intercept and modify outgoing CMS update requests (e.g., via a proxy tool)
  • Editing any CMS page (such as /admin/cms/edit/{id})

By introducing unfiltered script content directly into the HTTP payload; bypassing the UI-level sanitization the CMS endpoint accepts and stores the malicious JS.

Steps to Reproduce

  1. Log in as admin
  2. Navigate to: /admin/cms/edit/1
  3. Intercept the request (e.g., using Burp Suite)
  4. Modify the en[html_content] field to include raw JavaScript:
<img width="1166" height="580" alt="unnamed" src="https://github.com/user-attachments/assets/2163def6-02a4-46d3-b0bf-a66dcce00f55" /> <img width="1167" height="573" alt="unnamed" src="https://github.com/user-attachments/assets/ffe540aa-f7f9-4dc9-b934-6d2798cafa0a" />

A video PoC has been prepared showing:

  • Normal CMS editing behavior
  • How the sanitation process is expected to work
  • How altering the raw request bypasses sanitization
  • Execution of the stored script once the page is loaded This helps illustrate both expected behavior and actual vulnerability behavior clearly.

Video PoC: https://drive.google.com/file/d/1quGkBq1zwRhVrlJtVeDk9iQeUzqIyOM-/view

Impact

  • Administrator account takeover
  • Session hijacking
  • Unauthorized actions performed in admin context
  • Defacement or injection of malicious content into public pages
  • Potential expansion into full application compromise

Recommendations

Implement server-side sanitization (e.g., HTMLPurifier or Laravel Purifier) to strip or encode <script> tags regardless of how the request is manipulated.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package bagisto/bagisto < 2.3.10 2.3.10

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N/E:P
Weakness (CWE)
CWE-79
Platform
Composer
Package
bagisto/bagisto
Disclosed
02.01.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-2mwc-h2mg-v6p8 - CC BY 4.0

Vulnerability history: bagisto/bagisto

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (20) in the archive
Total entries
20
First → latest
11.2019 04.2026
Without a fix
2
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 8
  • Medium 9
  • Low 2

Disclosures per year

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 1
  5. 2023: 0
  6. 2024: 4
  7. 2025: 6
  8. 2026: 8
Severity:
  1. High · 7.1 CVE-2026-21447 < 2.3.10 2.3.10
  2. Bagisto has HTML Filter Bypass that Enables Stored XSS this entry
    Medium CVE-2026-21451 < 2.3.10 2.3.10
  3. High · 9.8 CVE-2026-21446 >= 2.3.0, < 2.3.10 2.3.10
  4. Critical · 9.0 CVE-2025-62417 < 2.3.8 2.3.8
  5. High · 8.3 CVE-2025-60880 >= 2.3.6, < 2.3.7 2.3.7
  6. High · 8.8 CVE-2023-36237 < 1.3.2 1.3.2
  7. High · 8.8 CVE-2019-14933 < 0.1.5 0.1.5

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.