CVE-2026-21451 — Vulnerability in bagisto/bagisto — CVE Details
Bagisto has HTML Filter Bypass that Enables Stored XSS
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.72%). Schedule for your next planned update.
Does your project use an affected bagisto/bagisto version?
Paste your composer.lock to check it for CVE-2026-21451 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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
- Log in as admin
- Navigate to: /admin/cms/edit/1
- Intercept the request (e.g., using Burp Suite)
- Modify the en[html_content] field to include raw JavaScript:
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 tags regardless of how the request is manipulated.
Advisory Timeline
- First published January 2, 2026 (329 days ago).
- Last revised February 3, 2026 — 31 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "bagisto/bagisto:^2.3.10"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| bagisto/bagisto Packagist · Affected: v0.1.0, v0.1.1, v0.1.2, v0.1.3 (+62 more) | 2.3.10 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.7 score means for each attack dimension.
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
References
- https://github.com/bagisto/bagisto/security/advisories/GHSA-2mwc-h2mg-v6p8WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-21451ADVISORY
- https://github.com/bagisto/bagisto/commit/f533b1cd9c80896792da60976179c95573d78b79WEB
- https://github.com/bagisto/bagistoPACKAGE
- https://github.com/bagisto/bagisto/releases/tag/v2.3.10WEB
Frequently Asked Questions
- What is CVE-2026-21451?
- Bagisto has HTML Filter Bypass that Enables Stored XSS. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 8.7/10).
- How do I check if my project is affected by CVE-2026-21451?
- CVE-2026-21451 affects bagisto/bagisto. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-21451 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 49.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-62417CRITICAL
bagisto has CSV Formula Injection in Create New Product
- CVE-2026-21448HIGH
Bagisto has Normal & Blind SSTI from low-privilege user when ordering product
- CVE-2026-21446HIGH
Bagisto Missing Authentication on Installer API Endpoints
- CVE-2026-21449HIGH
Bagisto is vulnerable to SSTI via name parameters provided by non-admin low-privilege users
- CVE-2026-75592MEDIUM
Kirby: Access to image files outside of the site root via path traversal in the media handling
- CVE-2026-88023MEDIUM
MongoDB: GridFS data disclosure and deletion via query-operator injection in file IDs