Cyber Posture

CVE-2025-66437

HighPublic PoCRCE

Published: 15 December 2025

Published
15 December 2025
Modified
05 January 2026
KEV Added
Patch
CVSS Score 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0010 27.6th percentile
Risk Priority 18 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2025-66437 is a high-severity Code Injection (CWE-94) vulnerability in Frappe Erpnext. Its CVSS base score is 8.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 27.6th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified are NIST 800-53 CM-7 (Least Functionality) and SI-10 (Information Input Validation).

Threat & Defense at a Glance

What attackers do: exploitation maps to Exploit Public-Facing Application (T1190) and 2 other techniques. What defenders deploy: see the NIST 800-53 controls recommended below.
Threat & Defense Details

Mitigating Controls (NIST 800-53 r5)AI

prevent

Validates and sanitizes user-supplied template expressions and address_dict parameters to prevent SSTI exploitation in frappe.render_template().

prevent

Configures the Jinja2 SandboxedEnvironment to the least functionality by prohibiting dangerous functions like frappe.db.sql in get_safe_globals(), blocking code execution even if injection occurs.

preventrecover

Remediates the flaw in get_address_display by patching the insecure rendering of Address Templates with attacker-controlled data.

MITRE ATT&CK Enterprise TechniquesAI

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
Why these techniques?

SSTI in web application enables exploitation of public-facing application (T1190) via template injection (T1221), leading to RCE and potential privilege escalation (T1068).

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

NVD Description

An SSTI (Server-Side Template Injection) vulnerability exists in the get_address_display method of Frappe ERPNext through 15.89.0. This function renders address templates using frappe.render_template() with a context derived from the address_dict parameter, which can be either a dictionary or a string…

more

referencing an Address document. Although ERPNext uses a custom Jinja2 SandboxedEnvironment, dangerous functions like frappe.db.sql remain accessible via get_safe_globals(). An authenticated attacker with permission to create or modify an Address Template can inject arbitrary Jinja expressions into the template field. By creating an Address document with a matching country, and then calling the get_address_display API with address_dict="address_name", the system will render the malicious template using attacker-controlled data. This leads to server-side code execution or database information disclosure.

Deeper analysisAI

CVE-2025-66437 is a Server-Side Template Injection (SSTI) vulnerability in the get_address_display method of Frappe ERPNext through version 15.89.0. This method renders address templates using frappe.render_template() with a context derived from the address_dict parameter, which can be either a dictionary or a string referencing an Address document. Although ERPNext employs a custom Jinja2 SandboxedEnvironment, dangerous functions such as frappe.db.sql remain accessible via get_safe_globals().

An authenticated attacker with permission to create or modify an Address Template can inject arbitrary Jinja expressions into the template field. The attacker can then create an Address document with a matching country and invoke the get_address_display API endpoint using address_dict set to the address name string. This causes the system to render the malicious template with attacker-controlled data, resulting in server-side code execution or database information disclosure. The vulnerability carries a CVSS v3.1 base score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) and maps to CWE-94 and CWE-1336.

Advisories providing additional details on the vulnerability are available at https://iamanc.github.io/post/erpnext-ssti-bug-4 and https://www.notion.so/SSTI-bug-4-239e6086eadc80aa9331fba874c674a5?source=copy_link.

Details

CWE(s)

Affected Products

frappe
erpnext
≤ 15.89.0

CVEs Like This One

CVE-2025-66434Same product: Frappe Erpnext
CVE-2023-54345Same product: Frappe Erpnext
CVE-2026-32954Same product: Frappe Erpnext
CVE-2026-27471Same product: Frappe Erpnext
CVE-2026-44446Same product: Frappe Erpnext
CVE-2026-44442Same product: Frappe Erpnext
CVE-2026-44447Same product: Frappe Erpnext
CVE-2025-67289Same product: Frappe Erpnext
CVE-2025-65267Same product: Frappe Erpnext
CVE-2026-31017Same product: Frappe Erpnext

References