Frappe Framework 17.0.0-dev - Stored XSS via eval in Number Card filters_config

4.6

Medium

Detected by

Fluid Attacks AI SAST Scanner

Disclosed by

Oscar Uribe

Summary

Full name

Frappe Framework 17.0.0-dev - Stored XSS via eval in Number Card filters_config

Code name

State

Public

Release date

Affected product

Frappe Framework

Vendor

Frappe

Affected version(s)

17.0.0-dev

Vulnerability name

Stored cross-site scripting (XSS)

Remotely exploitable

Yes

CVSS v4.0 vector string

CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

CVSS v4.0 base score

4.6

Exploit available

Yes

Description

A Stored Cross-Site Scripting (XSS) vulnerability exists in Frappe Framework version 17.0.0-dev due to unsafe evaluation of user-controlled data in the Number Card component. An authenticated attacker can create or modify a Number Card and store a malicious payload in the filters_config field.

When another user opens the affected Number Card in Desk, client-side code evaluates the stored filters_config value using eval, resulting in arbitrary JavaScript execution in the victim's browser. Multiple reported variants have been consolidated under a single vulnerability because they share the same root source (filters_config) and execution sink (eval).

Vulnerability

Case 1: Stored JS execution via eval (primary case)

  1. Source: attacker-controlled input in Number Card.filters_config (Type = Custom).

  2. Persistence: value is stored and returned to Desk clients when the document is opened.

  3. Primary sink:

    • frm.filters = eval(frm.doc.filters_config); on refresh.

    • frm.filters = eval(frm.doc.filters_config); on filters_config change.

  4. Impact: arbitrary JavaScript executes in the authenticated victim browser context.

Case 2: Derived HTML injection path after eval (same CVE, same root cause)

  1. After eval, the generated filter data is rendered into HTML rows using template literals.

  2. render_filters_table and set_dynamic_filters_in_table append HTML via jQuery .append() / .html().

  3. This is treated as a secondary/derived path of the same vulnerability family, not a separate CVE, because exploitation is already achieved at eval.

Relevant code:

  • frappe/frappe/desk/doctype/number_card/number_card.js:25

  • frappe/frappe/desk/doctype/number_card/number_card.js:93

  • frappe/frappe/desk/doctype/number_card/number_card.js:197-255

  • frappe/frappe/desk/doctype/number_card/number_card.js:548-568

  • frappe/frappe/desk/doctype/number_card/number_card.py:205-212 (whitelisted creation path)

PoC

Reproduction

  1. Login to Desk:

    • http://localhost:18080/login

  2. Open Number Card list:

    • http://localhost:18080/desk/number-card/view/list

  3. Click Add Number Card.

  4. Set fields:

    • Label: MCP Eval XSS PoC 2

    • Type: Custom

    • Method: frappe.desk.doctype.number_card.number_card.get_result

    • Filters Configuration: (alert(9222), [])

  5. Click Save.

  6. Observe that alert executes.

  7. Return to list view and open MCP Eval XSS PoC 2 again.

  8. Observe alert executes again (stored/persistent behavior).

Expected result:

  • JavaScript alert(9222) executes in the browser when the malicious Number Card is opened.

Evidence of Exploitation

  • Video of exploitation

  • Static evidence

Our security policy

We have reserved the ID CVE-2026-50705 to refer to this issue from now on.

System Information

  • Frappe Framework

  • Version 17.0.0-dev

  • Operating System: Any

References

Mitigation

There is currently no patch available for this vulnerability.

Credits

The vulnerability was discovered by Oscar Uribe from Fluid Attacks' Offensive Team using the AI SAST Scanner.

Timeline

Vulnerability discovered

Vendor contacted

Vendor replied

Public disclosure

Does your application use this vulnerable software?

During our free trial, our tools assess your application, identify vulnerabilities, and provide recommendations for their remediation.

Fluid Attacks' solutions enable organizations to identify, prioritize, and remediate vulnerabilities in their software throughout the SDLC. Supported by AI, automated tools, and pentesters, Fluid Attacks accelerates companies' risk exposure mitigation and strengthens their cybersecurity posture.

Get an AI summary of Fluid Attacks

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

© 2026 Fluid Attacks. We hack your software.

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

Get an AI summary of Fluid Attacks

© 2026 Fluid Attacks. We hack your software.

Subscribe to our newsletter

Stay updated on our upcoming events and latest blog posts, advisories and other engaging resources.

Get an AI summary of Fluid Attacks

© 2026 Fluid Attacks. We hack your software.