CVE-2025-66436: frappe · Template Injection
Affects frappeSource CVE Database V5
Not known to be exploited · CVSS 4.3 Medium.
Data as of 26 Oct 2026, 17:16 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 26% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NExploitation 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
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIfrappepkg:pypi/frappeOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should implement the following specific mitigations: 1) Immediately audit and restrict permissions to Terms and Conditions document creation/modification to trusted administrators only. 2) Upgrade ERPNext to a version where this vulnerability is patched once available; monitor vendor advisories closely. 3) As a temporary measure, disable or restrict the use of custom Terms and Conditions templates if feasible. 4) Review and harden the Jinja2 sandbox environment by removing or restricting dangerous globals such as frappe.db.sql from the template execution context. 5) Implement strict input validation and sanitization on the terms field to prevent injection of malicious template expressions. 6) Monitor logs for unusual template rendering activity or database queries initiated via template execution. 7) Enforce multi-factor authentication and strong credential management to reduce risk of unauthorized authenticated access. 8) Conduct internal penetration testing focusing on template injection vectors within ERPNext. 9) Prepare incident response plans to quickly address potential exploitation. These targeted actions go beyond generic advice by focusing on the specific attack vector and environment.
Description
An SSTI (Server-Side Template Injection) vulnerability exists in the get_terms_and_conditions method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (terms) using frappe.render_template() with a user-supplied context (doc). Although Frappe uses a custom SandboxedEnvironment, several dangerous globals such as frappe.db.sql are still available in the execution context via get_safe_globals(). An authenticated attacker with access to create or modify a Terms and Conditions document can inject arbitrary Jinja expressions into the terms field, resulting in server-side code execution within a restricted but still unsafe context. This vulnerability can be used to leak database information.