CVE-2025-66434: frappe-erpnext · Template Injection
Affects frappe-erpnextSource CVE Database V5
Not known to be exploited · CVSS 8.8 High.
Data as of 26 Oct 2026, 15:59 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 47% 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: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
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIfrappe-erpnextpkg:pypi/frappe-erpnextOther 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
- Immediately restrict access to the configuration of Dunning Types and the Dunning Letter Text child table to only the most trusted and necessary personnel.
- Monitor and audit all changes to Dunning Type configurations and template content for suspicious activity.
- Apply any official patches or updates from Frappe ERPNext as soon as they become available.
- If patches are not yet available, consider temporarily disabling or limiting the functionality that allows editing of Dunning Letter Text templates.
- Review and harden the template rendering environment by removing or restricting dangerous globals such as frappe.db.sql from the template context.
- Implement strong authentication and authorization controls to prevent unauthorized access to configuration features.
- Conduct internal penetration testing focusing on template injection vectors to identify any other similar vulnerabilities.
- Educate administrators and developers about the risks of SSTI and safe template handling practices.
- Employ network segmentation and monitoring to detect anomalous database queries or server-side code execution attempts.
- Prepare incident response plans to quickly address potential exploitation scenarios.
Description
An SSTI (Server-Side Template Injection) vulnerability exists in the get_dunning_letter_text method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (body_text) 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 configure Dunning Type and its child table Dunning Letter Text can inject arbitrary Jinja expressions, resulting in server-side code execution within a restricted but still unsafe context. This can leak database information.