CVE-2025-66438: a Template Engine · Improper Neutralization of Special Elements Used
Source CVE Database V5
Not known to be exploited · CVSS 9.8 Critical.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 42% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Affects
- Frappe ERPNext through 15.89.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 15 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
European organizations should implement the following specific mitigations: 1) Immediately audit and restrict permissions related to Print Format creation and modification to the minimum necessary users, ideally limiting to trusted administrators. 2) Monitor and log all changes to Print Formats and API calls to frappe.www.printview.get_html_and_style() for suspicious activity. 3) Employ strong authentication mechanisms, including multi-factor authentication, to reduce risk of credential compromise. 4) Review and sanitize any existing Print Formats for injected or suspicious Jinja2 expressions. 5) Engage with ERPNext vendors or community to obtain patches or updates addressing this vulnerability as soon as they become available. 6) Consider implementing Web Application Firewalls (WAF) with custom rules to detect and block unusual template injection patterns in API requests. 7) Educate internal users about the risks of credential phishing and insider threats. 8) If feasible, isolate ERPNext instances in segmented network zones to limit lateral movement in case of compromise. These targeted actions go beyond generic advice by focusing on the specific attack vector and operational context of ERPNext deployments.
Description
A Server-Side Template Injection (SSTI) vulnerability exists in the Frappe ERPNext through 15.89.0 Print Format rendering mechanism. Specifically, the API frappe.www.printview.get_html_and_style() triggers the rendering of the html field inside a Print Format document using frappe.render_template(template, doc) via the get_rendered_template() call chain. Although ERPNext wraps Jinja2 in a SandboxedEnvironment, it exposes sensitive functions such as frappe.db.sql through get_safe_globals(). An authenticated attacker with permission to create or modify a Print Format can inject arbitrary Jinja expressions into the html field. Once the malicious Print Format is saved, the attacker can call get_html_and_style() with a target document (e.g., Supplier or Sales Invoice) to trigger the render process. This leads to information disclosure from the database, such as database version, schema details, or sensitive values, depending on the injected payload. Exploitation flow: Create a Print Format with SSTI payload in the html field; call the get_html_and_style() API; triggers frappe.render_template(template, doc) inside get_rendered_template(); leaks database information via frappe.db.sql or other exposed globals.