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

CVE-2025-66437

High · published December 15, 2025

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

⚡ An authenticated user can unleash a server-side template injection in ERPNext with just the right address! 💥 Think of it like a restaurant accepting orders without checking what’s written on the receipt — they might just serve whatever the sneaky chef scribbled down. This vulnerability allows attackers to manipulate the address templates and potentially dish out dangerous commands directly to the server. If exploited, an attacker could execute arbitrary code on the server or leak sensitive database information, which is absolutely terrifying for any business relying on ERPNext for their operations. This can lead to complete compromise of the system, allowing attackers to alter data or steal confidential information, turning your trusted ERP system into a playground for malicious activities.

Put simply

Think of it like a restaurant accepting orders without checking what’s written on the receipt — they might just serve whatever the sneaky chef scribbled down. This vulnerability allows attackers to manipulate the address templates and potentially dish out dangerous commands directly to the server. The vulnerability in the get_address_display method allows an authenticated user to inject Jinja expressions through the address_dict parameter. Since the function uses a custom Jinja2 SandboxedEnvironment but still exposes dangerous functions via get_safe_globals(), it opens the door for remote code execution or data leaks.

What to do

If exploited, an attacker could execute arbitrary code on the server or leak sensitive database information, which is absolutely terrifying for any business relying on ERPNext for their operations. This can lead to complete compromise of the system, allowing attackers to alter data or steal confidential information, turning your trusted ERP system into a playground for malicious activities. To secure your system, apply the latest patch to the affected version (15.89.1 or later), and review your user permissions to ensure that only trusted users can create or modify Address Templates. Additionally, consider implementing stricter input validation for any template fields to avoid injection risks. You've got this! By taking these steps, you’ll be protecting your system like a pro! 🛡️

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.00600 · 48.0th 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-15T23: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_address_display method of Frappe ERPNext through 15.89.0
    cvelistv5