Skip to main content

Frappe ERPNext CVE-2025-66434

HIGH
Code Injection (CWE-94)
2025-12-15 cve@mitre.org
8.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain account with Dunning config rights
  2. Delivery
    Inject Jinja2 payload into Dunning Letter Text body_text
  3. Exploit
    Trigger get_dunning_letter_text template render
  4. Execution
    Execute frappe.db.sql in sandbox
  5. Impact
    Exfiltrate 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

NVD PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

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).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.6%
Top 53% exploitable
Prevalence
Medium
popular open-source ERP but narrower footprint than ubiquitous web stacks
Exploit
POC
Public exploit code exists
Data Quality
2 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.6%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

65
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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

cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*

More in Ssti

View all
CVE-2024-23692 CRITICAL POC
9.8 May 31

Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c

CVE-2025-47916 CRITICAL POC
10.0 May 16

Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e

CVE-2024-6386 CRITICAL POC
9.9 Aug 21

Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor

CVE-2026-75650 CRITICAL POC
10.0 Sep 07

Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica

CVE-2026-39980 CRITICAL POC
9.1 Apr 09

Server-Side Template Injection in OpenCTI notifier templates allows privileged administrators with 'Manage customization

CVE-2026-97359 CRITICAL POC
10.0 Sep 24

Unauthenticated remote code execution in Rejetto HFS2 (HTTP File Server) through version 2.4.0 lets an attacker execute

CVE-2025-23211 CRITICAL POC
9.9 Jan 28

Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve

CVE-2024-32651 CRITICAL POC
10.0 Apr 26

changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic

CVE-2024-4040 CRITICAL POC
10.0 Apr 22

A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all

CVE-2026-15734 CRITICAL POC
9.8 Aug 06

Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio

CVE-2024-24724 CRITICAL POC
9.8 Apr 03

Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re

CVE-2026-77136 CRITICAL POC
9.5 Aug 25

Server-side template injection in the TYPO3 'Powermail' extension lets an anonymous user submit Fluid template syntax th

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy