CVE-2025-66434 Details
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.
A server-side template injection (SSTI) vulnerability has been identified in Frappe ERPNext versions through 15.89.0. The issue arises in the 'get_dunning_letter_text' method, which renders Jinja2 templates controlled by the attacker. This is done using 'frappe.render_template()' with a user-supplied context, 'doc'. Despite Frappe's use of a custom SandboxedEnvironment, several dangerous globals, including 'frappe.db.sql', remain accessible via 'get_safe_globals()'. An authenticated attacker with the ability to configure Dunning Type and its associated Dunning Letter Text can inject arbitrary Jinja expressions. This exploitation leads to server-side code execution in a restricted but still unsafe context, with the potential to leak sensitive database information.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Dec 17, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://iamanc.github.io/post/erpnext-ssti-bug-1 | [email protected] | ExploitThird Party Advisory |
| https://www.notion.so/SSTI-bug-1-239e6086eadc8096bfcfe90551a3a483?source=copy_link | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
| CWE-1336 | Improper Neutralization of Special Elements Used in a Template Engine | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| frappe erpnext | <= 15.89.0 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 14, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Dec 23, 2025 | Initial Analysis | [email protected] |
| Dec 17, 2025 | CVE Modified | CISA-ADP |
| Dec 16, 2025 | CVE Modified | CISA-ADP |
| Dec 15, 2025 | New CVE Received | [email protected] |