CVE-2025-66437
8.8Frappe · ERPNext
A server-side template injection vulnerability in the get_address_display method of Frappe ERPNext allows authenticated attackers to execute arbitrary code or disclose sensitive database information.
Executive summary
A critical server-side template injection vulnerability in Frappe ERPNext exposes the application to remote code execution and unauthorized data access by authenticated users.
Vulnerability
This vulnerability occurs in the get_address_display method, which improperly handles Jinja2 template rendering. An authenticated attacker with permissions to manage Address Templates can inject malicious Jinja expressions that bypass sandbox protections, leading to full server-side execution.
Business impact
The ability to perform server-side template injection poses a severe risk to the integrity and confidentiality of the entire ERP environment. An attacker could leverage this flaw to gain unauthorized access to the underlying database, extract sensitive business data, or execute arbitrary commands on the host server. With a CVSS score of 8.8, this vulnerability represents a high-severity threat that could lead to complete system compromise and significant operational disruption.
Remediation
Immediate Action: Review vendor security advisories and apply the latest security updates to ERPNext as soon as they become available. If a patch is not yet released, restrict access to Address Template management functions to highly trusted administrative users only.
Proactive Monitoring: Monitor server logs for unusual API activity, specifically focusing on calls to the get_address_display endpoint, and watch for unexpected database queries or unauthorized system process execution.
Compensating Controls: Deploy a Web Application Firewall (WAF) with rules configured to detect and block suspicious Jinja2 syntax or common template injection patterns within HTTP requests.
Exploitation status
Public Exploit Available: Yes, a published proof-of-concept exists (attributed to the technical write-up referenced in the CVE record).
Analyst recommendation
Given the availability of a public proof-of-concept and the high potential for full system compromise, this vulnerability requires immediate attention. Security teams should prioritize patching or implementing strict access controls for the affected modules. Ensure that all users with permissions to modify templates are audited and monitored until a permanent fix is successfully deployed.