CVE-2025-66435: frappe · Template Injection
Affects frappeSource CVE Database V5
Not known to be exploited · CVSS 4.3 Medium.
Data as of 26 Oct 2026, 11:07 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
To mitigate CVE-2025-66435, organizations should first upgrade Frappe ERPNext to a version where this vulnerability is patched once available. Until a patch is released, restrict access to contract template creation and modification functions to only the most trusted and necessary users to reduce the attack surface. Implement strict role-based access controls (RBAC) and monitor logs for unusual template changes or suspicious activity related to contract templates. Consider applying additional input validation or sanitization on the contract_terms field to prevent injection of malicious Jinja expressions. If possible, disable or limit the availability of dangerous globals such as frappe.db.sql in the template rendering environment by customizing the sandbox configuration. Conduct regular audits of user privileges and enforce strong authentication mechanisms to prevent account compromise. Finally, monitor for any indicators of compromise or attempts to exploit this vulnerability and prepare an incident response plan focused on data leakage scenarios.
Description
An SSTI (Server-Side Template Injection) vulnerability exists in the get_contract_template method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (contract_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 Contract Template can inject arbitrary Jinja expressions into the contract_terms field, resulting in server-side code execution within a restricted but still unsafe context. This vulnerability can be used to leak database information.