CVE-2026-134388 in ERPNext
Summary
by MITRE • 11/21/2026
Frappe ERPNext 14.0.0 before 15.124.0 and 16.x before 16.52.0 contains a stored cross-site scripting vulnerability in the CRM module because notes on Leads and Opportunities are saved without passing through the HTML sanitiser. Authenticated users with the Sales User role can save a note containing a crafted payload that executes in another user's session when they open the record, acting with that user's permissions.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability identified within Frappe ERPNext versions prior to 14.0.0 before 15.124.0 and 16.x before 16.52.0 represents a significant security flaw located in the Customer Relationship Management module, specifically affecting how notes associated with Leads and Opportunities are processed. This issue is classified as a stored cross-site scripting vulnerability, which falls under CWE-79 in the Common Weakness Enumeration standard. The core technical failure lies in the application's handling of user-supplied input during the creation or modification of note records. When an authenticated user saves a note containing HTML content, the system fails to pass this data through its designated HTML sanitization routines. Consequently, malicious scripts embedded within these notes are persisted directly into the database without being stripped or encoded, creating a persistent threat vector that remains active until the record is manually cleaned or deleted by an administrator.
The operational impact of this vulnerability is substantial because it allows for session hijacking and privilege escalation through social engineering tactics inherent to enterprise resource planning systems. An attacker with the Sales User role can craft a note containing malicious JavaScript payloads, such as those designed to exfiltrate cookies, capture keystrokes, or perform actions on behalf of the victim using their authenticated credentials. When another user views the compromised Lead or Opportunity record, the browser executes the stored script within the context of that user's active session. This means the attack does not require phishing links sent via external channels; instead, it relies on the legitimate workflow of viewing business records, making detection difficult for end-users who trust the interface integrity. The attacker effectively gains the ability to act with the permissions of any Sales User who accesses the tainted record, potentially leading to unauthorized data access, modification of critical business information, or further lateral movement within the ERPNext environment if additional vulnerabilities are present in related modules.
From a threat intelligence perspective, this vulnerability aligns with MITRE ATT&CK technique T1059.007, which covers JavaScript execution, and can be leveraged for initial access or persistence depending on how the payload is constructed. The stored nature of the XSS means it serves as a persistent backdoor within the application's data layer rather than a transient reflection-based issue. Mitigation strategies must prioritize immediate patching to version 15.124.0 or later for the 14.x branch, and version 16.52.0 or later for the 16.x branch, as these releases address the sanitization logic in the CRM module. In environments where upgrading is not immediately feasible, administrators should implement strict input validation at the web server level to block script tags before they reach the application layer. Additionally, enforcing Content Security Policy headers can help mitigate the impact by restricting the execution of inline scripts and limiting data exfiltration attempts. Regular audits of user roles are also recommended to ensure that only necessary personnel have Sales User privileges, thereby reducing the attack surface available for exploitation.