CVE-2025-66434CWE-1336CWE-94code-injection

CVE-2025-66434

High · published December 15, 2025

CVSS v3.1
8.8
EPSS
1%
Percentile
47.6
In the wild
Unconfirmed
What it is

⚡ A sneaky Server-Side Template Injection hides in Frappe ERPNext, ready to let attackers inject Jinja2 templates like a chef slipping ingredients into a recipe! 🍽️ Think of it like a restaurant where the chef trusts customers to write down their own order, but some customers are mischief-makers who might ask for something bizarre or harmful! Here, an authenticated attacker can inject harmful code instead of just plain text, leading to worrisome results. An attacker could execute arbitrary code on the server, potentially leaking sensitive database information. Imagine a scenario where they can access customer records or financial details, all thanks to a crafty template injection! This could be absolutely devastating for the trust and security of your business.

Put simply

Think of it like a restaurant where the chef trusts customers to write down their own order, but some customers are mischief-makers who might ask for something bizarre or harmful! Here, an authenticated attacker can inject harmful code instead of just plain text, leading to worrisome results. The vulnerability arises in the get_dunning_letter_text method of Frappe ERPNext, where attacker-controlled Jinja2 templates are rendered using the frappe.render_template() function. Despite using a custom SandboxedEnvironment, dangerous globals remain accessible, allowing attackers to run harmful code.

What to do

An attacker could execute arbitrary code on the server, potentially leaking sensitive database information. Imagine a scenario where they can access customer records or financial details, all thanks to a crafty template injection! This could be absolutely devastating for the trust and security of your business. To mitigate this vulnerability, patch Frappe ERPNext to version 15.89.1 or later immediately. Additionally, review your implementations of the Dunning Type and Dunning Letter Text to limit user access and sanitize inputs effectively. 🛡️ This is fixable! Take action now, and you'll be on your way to leveling up your security game! 🚀

The record
Technical detail
CVSS v3.1
8.8 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00590 · 47.6th percentile
Weaknesses
CWE-1336 · Improper Neutralization of Special Elements Used in a Template Engine; CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2025-12-15T22:15Z
Affected products (1)
ProductVersionsFixed in
frappe/erpnext≤ 15.89.0—
References (2)
EPSS history
Timeline
  • 15 DEC 00:00Z
    An SSTI (Server-Side Template Injection) vulnerability exists in the get_dunning_letter_text method of Frappe ERPNext through 15.89.0
    cvelistv5