/

CVE-2026-109671

Severity:

HIGH RISK

(7.3)

Stored XSS (CWE-79) in Frappe ERPNext Profile Field

CVE-2026-109671

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Administrator Account Takeover

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 profile field that is rendered on portal pages without proper escaping. A low-privilege attacker who can save malicious content in that field may cause script to execute in an administrator's browser, potentially enabling account takeover.

Frappe ERPNext contains a stored cross-site scripting vulnerability in a profile field that is rendered on portal pages without proper escaping. A low-privilege attacker who can save malicious content in that field may cause script to execute in an administrator's browser, potentially enabling account takeover.

Affected context

The issue may occur in ERPNext deployments where:

  • A low-privilege user can edit or submit the affected profile field
  • The field value is displayed on portal pages
  • The value is inserted into rendered output without context-appropriate escaping
  • An administrator views a page containing the stored value

Risk depends on the permissions available to create or modify profile data and on how administrators interact with affected portal pages.

The issue may occur in ERPNext deployments where:

  • A low-privilege user can edit or submit the affected profile field
  • The field value is displayed on portal pages
  • The value is inserted into rendered output without context-appropriate escaping
  • An administrator views a page containing the stored value

Risk depends on the permissions available to create or modify profile data and on how administrators interact with affected portal pages.

Exploit preconditions

  • Attack surface: Portal pages that render profile information
  • Required access: Low-privilege access sufficient to store content in the affected profile field
  • Trigger point: An administrator views a portal page containing the stored value
  • Why exploitation is possible: User-controlled content is rendered without adequate output encoding, allowing browser-interpreted script to execute in the administrator's session context
  • Attack surface: Portal pages that render profile information
  • Required access: Low-privilege access sufficient to store content in the affected profile field
  • Trigger point: An administrator views a portal page containing the stored value
  • Why exploitation is possible: User-controlled content is rendered without adequate output encoding, allowing browser-interpreted script to execute in the administrator's session context

Why this happens

The underlying bug is a failure to apply context-appropriate output encoding to a user-controlled profile field before rendering it in portal pages. This creates a persistent injection point: attacker-supplied content is stored by the application and later treated as active browser markup or script when viewed by another user. The behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly called cross-site scripting.

The underlying bug is a failure to apply context-appropriate output encoding to a user-controlled profile field before rendering it in portal pages. This creates a persistent injection point: attacker-supplied content is stored by the application and later treated as active browser markup or script when viewed by another user. The behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly called cross-site scripting.

Potential impact

  • An attacker may perform actions in an administrator's authenticated browser session
  • Administrative account credentials or session information could be exposed, depending on browser and application controls
  • Application settings or business data could be modified
  • Additional users may be targeted through repeated viewing of affected pages
  • The application may experience unauthorized administrative changes or data exposure
  • An attacker may perform actions in an administrator's authenticated browser session
  • Administrative account credentials or session information could be exposed, depending on browser and application controls
  • Application settings or business data could be modified
  • Additional users may be targeted through repeated viewing of affected pages
  • The application may experience unauthorized administrative changes or data exposure

General mitigation guidance

Mitigation generally focuses on ensuring that untrusted profile data is treated as data rather than executable browser content.

Common defensive patterns include:

  • Applying context-aware output encoding at every rendering sink
  • Using templating systems with auto-escaping enabled by default
  • Allowing HTML only through narrowly scoped, sanitized allowlists when rich text is required
  • Reducing trust in user-editable profile fields and validating content against an explicit schema
  • Applying restrictive Content Security Policy controls as defense in depth
  • Limiting administrative privileges and reducing the impact of compromised administrator sessions
  • Avoiding unsafe rendering modes unless the content has been securely sanitized for its exact context

Mitigation generally focuses on ensuring that untrusted profile data is treated as data rather than executable browser content.

Common defensive patterns include:

  • Applying context-aware output encoding at every rendering sink
  • Using templating systems with auto-escaping enabled by default
  • Allowing HTML only through narrowly scoped, sanitized allowlists when rich text is required
  • Reducing trust in user-editable profile fields and validating content against an explicit schema
  • Applying restrictive Content Security Policy controls as defense in depth
  • Limiting administrative privileges and reducing the impact of compromised administrator sessions
  • Avoiding unsafe rendering modes unless the content has been securely sanitized for its exact context

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying unescaped user-controlled values in templates and response builders
  • Code review checks for raw HTML rendering, disabled auto-escaping, and unsafe DOM insertion
  • Tests that submit encoded and markup-like values through profile fields and verify safe rendering
  • Repository searches for rendering APIs that bypass escaping or sanitization
  • Web application monitoring for unexpected script-like content in profile data and unusual administrative actions
  • Policy enforcement requiring approved sanitization libraries and security checks for user-controlled output

Automated code review and web application testing tools may help identify these patterns, but findings should be validated in the relevant rendering context.

Organizations can look for this class of issue through:

  • Static analysis rules identifying unescaped user-controlled values in templates and response builders
  • Code review checks for raw HTML rendering, disabled auto-escaping, and unsafe DOM insertion
  • Tests that submit encoded and markup-like values through profile fields and verify safe rendering
  • Repository searches for rendering APIs that bypass escaping or sanitization
  • Web application monitoring for unexpected script-like content in profile data and unusual administrative actions
  • Policy enforcement requiring approved sanitization libraries and security checks for user-controlled output

Automated code review and web application testing tools may help identify these patterns, but findings should be validated in the relevant rendering context.

Sources

SourceLink
github.comgithub.com/frappe/erpnext/security/advisories/GHSA-rg9g-c26v-cw27
vulncheck.comvulncheck.com/advisories/frappe-erpnext-before-15.113.0-stored-xss-via-profile-field-in-portal-pages

Frequently asked

questions

It can be exploitable through the application's web interface when a low-privilege user can store content in the affected profile field and an administrator later views the rendered page.

No. The attacker generally needs only the permissions required to edit or submit the affected profile data. Administrator interaction with the page is the trigger that increases impact.

Apply context-aware output encoding and retain automatic template escaping. If limited HTML is necessary, sanitize it with a strict allowlist designed for the specific rendering context.

Treat profile fields as untrusted input, test every output sink for correct encoding, enforce secure rendering policies, and use browser-side defenses such as an appropriately restrictive Content Security Policy.

It can be exploitable through the application's web interface when a low-privilege user can store content in the affected profile field and an administrator later views the rendered page.

No. The attacker generally needs only the permissions required to edit or submit the affected profile data. Administrator interaction with the page is the trigger that increases impact.

Apply context-aware output encoding and retain automatic template escaping. If limited HTML is necessary, sanitize it with a strict allowlist designed for the specific rendering context.

Treat profile fields as untrusted input, test every output sink for correct encoding, enforce secure rendering policies, and use browser-side defenses such as an appropriately restrictive Content Security Policy.

Find out what's already
exploitable in your codebase.