Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2023-54408 Overview
CVE-2023-54408 is an HTML injection vulnerability in the Frappe framework that enables stored cross-site scripting (XSS). The flaw affects Frappe versions before 13.52.0 and 14.x versions before 14.31.0. Weak escaping of user-supplied content allows attackers to submit crafted HTML that bypasses sanitization and renders in victim browsers. The issue is tracked under [CWE-79] (Improper Neutralization of Input During Web Page Generation). Successful exploitation requires user interaction, such as viewing a page containing the injected markup.
Critical Impact
Attackers can inject arbitrary HTML and JavaScript that executes in the context of other users' browsers, enabling session abuse, UI manipulation, and credential theft within Frappe-powered applications.
Affected Products
- Frappe Framework versions before 13.52.0
- Frappe Framework 14.x versions before 14.31.0
- Applications built on vulnerable Frappe releases (including ERPNext deployments on affected versions)
Discovery Timeline
- 2026-10-12 - CVE-2023-54408 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2023-54408
Vulnerability Analysis
Frappe renders user-supplied content in multiple pages across the framework. The affected versions apply escaping routines that fail to neutralize all HTML control characters and tag constructs. Attackers can craft input containing HTML tags, event handlers, or <script> elements that bypass the escaping logic. When another user loads a page displaying the attacker's content, the browser parses and executes the injected markup. The vulnerability is classified as cross-site scripting under [CWE-79].
The impact is scoped to the victim's browser session within the Frappe application. Executed JavaScript can read page content, perform authenticated actions as the victim, exfiltrate session tokens, or manipulate rendered UI elements. Because Frappe underlies ERPNext and other business applications, exploitation can expose business records, user profiles, and administrative workflows depending on the viewer's role.
Root Cause
The root cause is insufficient output encoding in Frappe's page rendering pipeline. The escaping function does not reliably convert or strip all HTML metacharacters before injecting user data into the response body. This allows active content to persist through the rendering boundary and reach the DOM in executable form.
Attack Vector
An unauthenticated or low-privileged attacker submits crafted HTML into any field or endpoint that stores or echoes user-supplied content through the vulnerable escaping path. The payload remains dormant until another user, often a privileged operator, views the affected page. User interaction is required for execution, which aligns with the stored or reflected XSS pattern described in the GitHub Security Advisory GHSA-4jj9-5vgc-gc4j.
No verified public exploit code is published for this issue. Technical specifics are documented in the GitHub Security Advisory GHSA-4jj9-5vgc-gc4j and the VulnCheck HTML Injection Advisory.
Detection Methods for CVE-2023-54408
Indicators of Compromise
- Stored records or form fields containing HTML tags such as <script>, <img onerror=...>, <svg onload=...>, or encoded variants targeting Frappe pages.
- Outbound browser requests from authenticated Frappe sessions to unexpected external domains, suggesting token or data exfiltration.
- Audit log entries showing actions performed by privileged users that do not match their normal workflow patterns.
Detection Strategies
- Inventory running Frappe and ERPNext instances and compare installed versions against 13.52.0 and 14.31.0.
- Scan database tables backing user-facing fields for stored HTML markup or event-handler attributes that should not appear in business data.
- Review web server and application logs for POST requests containing encoded <, >, or JavaScript URI schemes targeting Frappe document endpoints.
Monitoring Recommendations
- Enable and monitor Content Security Policy (CSP) violation reports to catch inline script execution attempts.
- Alert on anomalous session activity, such as rapid API calls from a user session immediately after a page load.
- Correlate Frappe application logs with endpoint telemetry to identify downstream effects of browser-side compromise.
How to Mitigate CVE-2023-54408
Immediate Actions Required
- Upgrade Frappe to version 13.52.0 or later on the 13.x branch, or 14.31.0 or later on the 14.x branch.
- Audit stored records in user-editable fields for pre-existing injected HTML before upgrading, and sanitize or quarantine suspect entries.
- Rotate session cookies and API keys for users who may have viewed malicious content on vulnerable versions.
Patch Information
The Frappe maintainers resolved the weak escaping in versions 13.52.0 and 14.31.0. Review the GitHub Security Advisory GHSA-4jj9-5vgc-gc4j for the fix commits and upgrade guidance. ERPNext and bench-based deployments should run bench update after confirming compatibility with the target version.
Workarounds
- Deploy a web application firewall rule to strip or block HTML tags in request parameters targeting Frappe form submission endpoints.
- Enforce a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins.
- Restrict write access to user-editable fields to trusted roles until the upgrade is complete.
# Upgrade Frappe using bench to a patched release
bench switch-to-branch version-14 frappe --upgrade
bench update --patch
bench --site all migrate
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

