CVE-2025-66437 Details
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 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.
A server-side template injection (SSTI) vulnerability has been identified in Frappe ERPNext versions through 15.89.0. The issue arises in the 'get_address_display' method, which uses 'frappe.render_template()' to render address templates based on the 'address_dict' parameter. This parameter can be a dictionary or a string referencing an Address document. Despite ERPNext's implementation of a custom Jinja2 SandboxedEnvironment, certain dangerous functions, including 'frappe.db.sql', can still be accessed through 'get_safe_globals()'. An authenticated attacker with the ability to create or modify Address Templates can inject arbitrary Jinja expressions into the template field. By crafting an Address document that matches a specific country and then invoking the 'get_address_display' API with the corresponding address name, the injected template is executed using data controlled by the attacker. This exploitation can result in unauthorized server-side code execution or the disclosure of sensitive database information.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Dec 16, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://iamanc.github.io/post/erpnext-ssti-bug-4 | [email protected] | ExploitThird Party Advisory |
| https://www.notion.so/SSTI-bug-4-239e6086eadc80aa9331fba874c674a5?source=copy_link | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
| CWE-1336 | Improper Neutralization of Special Elements Used in a Template Engine | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| frappe erpnext | <= 15.89.0 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 14, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 5, 2026 | Initial Analysis | [email protected] |
| Dec 16, 2025 | CVE Modified | CISA-ADP |
| Dec 15, 2025 | New CVE Received | [email protected] |