CVE-2026-21451: Bagisto has HTML Filter Bypass that Enables Stored XSS

Published Jan 2, 2026
·
Updated

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[htmlcontent] 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.

Other sources

Bagisto is an open source laravel eCommerce platform. A stored Cross-Site Scripting (XSS) vulnerability exists in Bagisto prior to version 2.3.10 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. Version 2.3.10 fixes the issue.

MITRE

Affected Software

3 affected componentsFixes available
Bagisto Bagisto<2.3.10
composer/bagisto/bagisto<2.3.10
2.3.10
Webkul Bagisto<2.3.10

Event History

Jan 2, 2026
CVE Published
via MITRE·08:37 PM
Data Sourced
via MITRE·08:37 PM
DescriptionWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·09:16 PM
Data Sourced
via GitHub·09:16 PM
DescriptionWeaknessAffected Software
Aug 29, 58046
Event
via FIRST·03:13 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-21451?

CVE-2026-21451 has been classified as a medium severity vulnerability due to the potential for stored cross-site scripting (XSS) attacks.

2

How do I fix CVE-2026-21451?

To fix CVE-2026-21451, you should update your Bagisto installation to version 2.3.10 or later where the vulnerability has been patched.

3

What impact does CVE-2026-21451 have on my Bagisto site?

CVE-2026-21451 may allow an attacker to inject malicious scripts into CMS pages, potentially compromising users who visit the affected pages.

4

Which versions of Bagisto are affected by CVE-2026-21451?

CVE-2026-21451 affects all Bagisto versions prior to 2.3.10.

5

Is there a workaround for CVE-2026-21451?

While updating is the recommended solution for CVE-2026-21451, you may also consider disabling the CMS editor as a temporary workaround.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203