/

CVE-2026-109612

Severity:

HIGH RISK

(7.3)

Stored XSS (CWE-79) in Frappe ERPNext Report View UI

CVE-2026-109612

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Code Execution and Session Compromise

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Frappe ERPNext contains a stored cross-site scripting vulnerability in a report view that renders saved record names without escaping them. An authenticated user who can create records may store a crafted name that executes script in the browser session of another user who opens the affected report.

Frappe ERPNext contains a stored cross-site scripting vulnerability in a report view that renders saved record names without escaping them. An authenticated user who can create records may store a crafted name that executes script in the browser session of another user who opens the affected report.

Affected context

The vulnerability occurs in ERPNext report views that interpolate stored record names into generated markup without applying context-appropriate output encoding. It is relevant where authenticated users can create or edit records and other users can later access reports displaying those names.

The vulnerability occurs in ERPNext report views that interpolate stored record names into generated markup without applying context-appropriate output encoding. It is relevant where authenticated users can create or edit records and other users can later access reports displaying those names.

Exploit preconditions

  • Attack surface: Authenticated ERPNext report views
  • Required access: Permission to create or modify records whose names are later displayed
  • Trigger point: A victim opens a report containing the crafted stored record name
  • Why exploitation is possible: Stored input is inserted into markup without sufficient escaping, allowing browser-interpreted script content to execute in the victim's session
  • Attack surface: Authenticated ERPNext report views
  • Required access: Permission to create or modify records whose names are later displayed
  • Trigger point: A victim opens a report containing the crafted stored record name
  • Why exploitation is possible: Stored input is inserted into markup without sufficient escaping, allowing browser-interpreted script content to execute in the victim's session

Why this happens

The underlying defect is insufficient output encoding when a stored record name is incorporated into HTML or other browser-interpreted markup. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, because attacker-controlled data is treated as presentation markup rather than safely encoded text.

The underlying defect is insufficient output encoding when a stored record name is incorporated into HTML or other browser-interpreted markup. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, because attacker-controlled data is treated as presentation markup rather than safely encoded text.

Potential impact

  • Unauthorized actions may be performed through a victim's authenticated session
  • Sensitive data visible to the victim may be exposed
  • Session or application tokens could be targeted where browser protections are insufficient
  • Malicious content may be propagated to additional report users
  • User trust and application integrity could be affected
  • Unauthorized actions may be performed through a victim's authenticated session
  • Sensitive data visible to the victim may be exposed
  • Session or application tokens could be targeted where browser protections are insufficient
  • Malicious content may be propagated to additional report users
  • User trust and application integrity could be affected

General mitigation guidance

Mitigation generally centers on treating record names and other persisted fields as untrusted whenever they reach a browser.

Common defensive patterns include:

  • Applying context-appropriate output encoding at every markup-rendering boundary
  • Using safe templating and DOM APIs that insert untrusted values as text rather than markup
  • Validating and constraining record-name input without relying on validation as a replacement for encoding
  • Limiting report access and record-creation privileges according to least privilege
  • Using browser security controls such as a restrictive Content Security Policy as defense in depth
  • Avoiding unsafe HTML rendering unless content is explicitly sanitized and its trust boundary is documented

Mitigation generally centers on treating record names and other persisted fields as untrusted whenever they reach a browser.

Common defensive patterns include:

  • Applying context-appropriate output encoding at every markup-rendering boundary
  • Using safe templating and DOM APIs that insert untrusted values as text rather than markup
  • Validating and constraining record-name input without relying on validation as a replacement for encoding
  • Limiting report access and record-creation privileges according to least privilege
  • Using browser security controls such as a restrictive Content Security Policy as defense in depth
  • Avoiding unsafe HTML rendering unless content is explicitly sanitized and its trust boundary is documented

How teams detect issues like this

Detection can include static analysis for string interpolation or concatenation of stored fields into HTML, templates, and client-side markup. Code review should examine report renderers, formatter callbacks, and UI components for missing context-aware escaping. Dynamic testing can use inert XSS markers in authorized test environments to verify that record names are rendered as text. Policy enforcement may require approved templating helpers, output-encoding libraries, and security checks in CI; automated review tools can help identify suspicious rendering paths.

Detection can include static analysis for string interpolation or concatenation of stored fields into HTML, templates, and client-side markup. Code review should examine report renderers, formatter callbacks, and UI components for missing context-aware escaping. Dynamic testing can use inert XSS markers in authorized test environments to verify that record names are rendered as text. Policy enforcement may require approved templating helpers, output-encoding libraries, and security checks in CI; automated review tools can help identify suspicious rendering paths.

Sources

SourceLink
github.comgithub.com/frappe/erpnext/security/advisories/GHSA-f99r-gp2w-xghj
vulncheck.comvulncheck.com/advisories/frappe-erpnext-before-15.120.0-stored-xss-via-report-view

Frequently asked

questions

It can be triggered through the web application, but exploitation generally requires an authenticated user who can create or modify a record and a separate user to open the affected report.

Not necessarily. The relevant prerequisite is permission to create records whose names are displayed in the vulnerable report; the exact scope depends on ERPNext role and report permissions.

Encode stored values for the output context and render them as text by default. Use a reviewed sanitizer only when intentionally supporting limited HTML.

Treat all persisted user-controlled fields as untrusted, enforce safe rendering patterns in shared UI components, review report views for unsafe interpolation, and test authorization and output encoding in CI.

It can be triggered through the web application, but exploitation generally requires an authenticated user who can create or modify a record and a separate user to open the affected report.

Not necessarily. The relevant prerequisite is permission to create records whose names are displayed in the vulnerable report; the exact scope depends on ERPNext role and report permissions.

Encode stored values for the output context and render them as text by default. Use a reviewed sanitizer only when intentionally supporting limited HTML.

Treat all persisted user-controlled fields as untrusted, enforce safe rendering patterns in shared UI components, review report views for unsafe interpolation, and test authorization and output encoding in CI.

Find out what's already
exploitable in your codebase.