CVE-2025-66437: Code Injection
An SSTI (Server-Side Template Injection) vulnerability exists in the getaddressdisplay method of Frappe ERPNext through 15.89.0. This function renders address templates using frappe.rendertemplate() with a context derived from the addressdict 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 getsafeglobals(). 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 getaddressdisplay API with addressdict="addressname", the system will render the malicious template using attacker-controlled data. This leads to server-side code execution or database information disclosure.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-66437?
CVE-2025-66437 is considered a critical vulnerability due to the potential for remote code execution via Server-Side Template Injection.
How do I fix CVE-2025-66437?
To fix CVE-2025-66437, update Frappe ERPNext to version 15.90.0 or later where this vulnerability has been addressed.
What kind of attack can CVE-2025-66437 facilitate?
CVE-2025-66437 can facilitate attacks such as remote code execution, allowing attackers to execute arbitrary code on the server.
In which versions of Frappe ERPNext is CVE-2025-66437 present?
CVE-2025-66437 is present in Frappe ERPNext versions up to and including 15.89.0.
What should I do if I cannot immediately update to fix CVE-2025-66437?
If you cannot immediately update, you should apply all necessary security mitigations and monitor your systems for suspicious activity related to CVE-2025-66437.