Frappe ERPNext CVE-2025-66434
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain account with Dunning config rights
-
DeliveryInject Jinja2 payload into Dunning Letter Text body_text
-
ExploitTrigger get_dunning_letter_text template render
-
ExecutionExecute frappe.db.sql in sandbox
-
ImpactExfiltrate database contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated Frappe/ERPNext user with permission to configure the Dunning Type doctype and edit its Dunning Letter Text child table (the body_text field). The injected Jinja2 is only reachable through the get_dunning_letter_text code path that renders body_text via frappe.render_template() with the doc context. Impact is bounded by Frappe's custom SandboxedEnvironment - full RCE is limited, but dangerous globals exposed through get_safe_globals(), notably frappe.db.sql, permit database access and information disclosure. Key limiting factors: valid authenticated session, the specific Dunning configuration privilege (not a default low-privilege/anonymous role), and affected versions up to and including 15.89.0. |
| Impact | This is a genuine priority for organizations running Frappe/ERPNext, though several signals temper the raw CVSS 8.8. The CVSS vector (AV:N/AC:L/PR:L/UI:N) indicates network-reachable, low-complexity exploitation with no user interaction, and public exploit code exists (two write-ups referenced via NVD), which raises practical exploitability. However, PR:L confirms authentication is required - specifically an account privileged enough to configure Dunning Type and its Dunning Letter Text child table - so this is not an unauthenticated internet-wide mass-exploitation candidate. No EPSS score was provided in the input, and the CVE is NOT listed in CISA KEV, so there is no evidence of confirmed active exploitation; the risk signal rests on POC availability plus low attack complexity. The vendor-assigned C:H/I:H/A:H is arguably optimistic: the description itself states execution occurs 'within a restricted but still unsafe context' inside Frappe's custom SandboxedEnvironment, with the concrete demonstrated impact being database information leakage via the exposed frappe.db.sql global - i.e. the sandbox meaningfully constrains full OS-level RCE despite the RCE/Code Injection tags. Net: a real, patch-worthy authenticated SSTI/data-exposure issue, not a drop-everything unauthenticated RCE. |
| Exploit ScenarioDerived | An attacker who already holds (or phishes/compromises) a Frappe account with permission to edit Dunning Type configuration injects a malicious Jinja2 expression - e.g. one invoking frappe.db.sql - into the Dunning Letter Text body_text field. When get_dunning_letter_text renders the template via frappe.render_template() with the document context, the payload executes server-side inside the sandbox and returns sensitive database contents. Public proof-of-concept write-ups demonstrating this SSTI are already available, lowering the bar to reproduce. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Authenticated server-side template injection in Frappe ERPNext through 15.89.0 allows users with privileges to configure Dunning Type and its Dunning Letter Text child table to inject arbitrary Jinja2 expressions via the get_dunning_letter_text method's body_text field, leading to database information disclosure through exposed globals like frappe.db.sql. Publicly available exploit code exists, though the custom SandboxedEnvironment limits full remote code execution. Exploitation requires a valid authenticated session and the specific Dunning configuration privilege, not a default low-privilege or anonymous role.
RemediationAI
No vendor-released patch was identified at time of analysis. Until an official fix is available, restrict the ability to configure Dunning Type doctypes and edit the Dunning Letter Text child table to only fully trusted administrators, as this privilege is required for exploitation. Audit existing Dunning Letter Text entries for malicious Jinja2 expressions, and consider temporarily disabling the dunning feature if it is not business-critical. Monitor database logs for unexpected queries originating from template rendering. Upgrading beyond version 15.89.0 may include a fix, but this is not confirmed; consult the vendor's advisory channels. The trade-off of restricting privileges is potential disruption to legitimate dunning configuration workflows. Public exploit code is available at the references, increasing urgency for these mitigations.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is a CWE-94 code injection flaw in Frappe ERPNext's Dunning letter rendering. The get_dunning_letter_text method renders attacker-controlled Jinja2 templates (body_text) using frappe.render_template() with a user-supplied context (doc). Although Frappe employs a custom SandboxedEnvironment, get_safe_globals() still exposes dangerous globals such as frappe.db.sql, allowing an authenticated attacker to inject Jinja expressions that execute database queries within a restricted but unsafe context. The affected product is identified by CPE cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:* (all versions up to 15.89.0). The root cause is improper neutralization of special elements used in a template engine (CWE-94), specifically insufficient sandboxing of template globals.
Know when Ssti gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable, low-complexity, but needs a privileged config role so PR:L; sandboxed frappe.db.sql enables DB read/write (C:H/I:H) with no demonstrated availability impact (A:N).
Primary rating from NVD.
CVSS VectorNVD
DescriptionNVD
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.
Executive ViewAI
Frappe ERPNext deployments up to and including version 15.89.0 are exposed to a template-injection flaw that allows users who already hold Dunning configuration rights to read data directly out of the ERP database through crafted Dunning letter text. With publicly available exploit code exists and no vendor patch released, the affected business data - potentially customer, financial, and operational records - is at elevated risk until mitigation is applied. Leadership should care because the exposure sits behind a privileged internal account rather than an anonymous attacker, meaning risk is concentrated in insider, contractor, or compromised-admin scenarios that are harder to detect.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict Dunning Type and Dunning Letter Text configuration privileges to a minimal set of trusted administrators; block or sanitize Jinja2-style template expressions in Dunning configuration input via WAF, reverse proxy, or server-side validation; enable and alert on audit logging for get_dunning_letter_text and body_text changes; and rotate database credentials for any accounts potentially exposed through injected frappe.db.sql queries.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)NVD
Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c
Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e
Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor
Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica
Server-Side Template Injection in OpenCTI notifier templates allows privileged administrators with 'Manage customization
Unauthenticated remote code execution in Rejetto HFS2 (HTTP File Server) through version 2.4.0 lets an attacker execute
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve
changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic
A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all
Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio
Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re
Server-side template injection in the TYPO3 'Powermail' extension lets an anonymous user submit Fluid template syntax th
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB