Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-66435: n/a

0
High
VulnerabilityCVE-2025-66435cvecve-2025-66435
Published: Mon Dec 15 2025 (12/15/2025, 00:00:00 UTC)
Source: CVE Database V5

Description

CVE-2025-66435 is a Server-Side Template Injection (SSTI) vulnerability in the get_contract_template method of Frappe ERPNext versions up to 15. 89. 0. It allows an authenticated attacker with permissions to create or modify Contract Templates to inject malicious Jinja2 template expressions into the contract_terms field. Despite the use of a custom SandboxedEnvironment, dangerous globals like frappe. db. sql remain accessible, enabling server-side code execution within a restricted but unsafe context. This can lead to unauthorized database information disclosure and potentially further compromise. Exploitation requires authentication and specific privileges, limiting the attack surface but still posing a significant risk. No known public exploits exist yet, and no CVSS score has been assigned.

AI-Powered Analysis

AILast updated: 12/15/2025, 17:15:15 UTC

Technical Analysis

CVE-2025-66435 is a critical Server-Side Template Injection (SSTI) vulnerability found in the get_contract_template method of Frappe ERPNext up to version 15.89.0. The vulnerability arises because the method renders user-supplied Jinja2 templates (specifically in the contract_terms field) using frappe.render_template() with a user-controlled context (doc). Although Frappe attempts to sandbox template execution via a custom SandboxedEnvironment, it inadvertently exposes dangerous global functions such as frappe.db.sql through get_safe_globals(). This exposure allows an authenticated attacker who can create or modify Contract Templates to inject arbitrary Jinja expressions that execute server-side code. The execution context is restricted but still unsafe, enabling attackers to perform unauthorized database queries and leak sensitive information. The vulnerability requires authentication and specific privileges, which limits exploitation to insiders or compromised accounts with template editing rights. No public exploits have been reported yet, and no official patches or CVSS scores are currently available. The vulnerability highlights the risks of improper sandboxing in template engines and the importance of tightly controlling template editing capabilities in ERP systems.

Potential Impact

For European organizations, this vulnerability poses a significant risk to the confidentiality and integrity of sensitive business data managed within ERPNext systems. Successful exploitation can lead to unauthorized disclosure of database contents, including potentially sensitive contract information, customer data, and internal business logic. This could result in financial losses, reputational damage, and regulatory non-compliance, especially under GDPR requirements for data protection. The requirement for authentication and specific privileges reduces the likelihood of external attackers exploiting this vulnerability directly but increases the risk from insider threats or compromised user accounts. Organizations with extensive use of ERPNext for contract management and those with less stringent internal access controls are particularly vulnerable. The ability to execute server-side code, even in a restricted context, could also be leveraged for further lateral movement or privilege escalation within the affected environment.

Mitigation Recommendations

1. Immediately restrict permissions to create or modify Contract Templates to only the most trusted and necessary users. 2. Conduct a thorough audit of existing contract templates to detect and remove any suspicious or unauthorized Jinja2 expressions. 3. Monitor logs for unusual template rendering activity or database queries originating from template execution contexts. 4. Implement strict access controls and multi-factor authentication to reduce the risk of account compromise. 5. Follow Frappe ERPNext vendor channels closely for official patches or updates addressing this vulnerability and apply them promptly once available. 6. Consider implementing additional application-layer filtering or validation of template inputs to prevent injection of malicious expressions. 7. Educate developers and administrators about the risks of SSTI and the importance of secure template handling. 8. If feasible, isolate ERPNext instances handling sensitive data within segmented network zones to limit potential lateral movement.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
mitre
Date Reserved
2025-11-30T00:00:00.000Z
Cvss Version
null
State
PUBLISHED

Threat ID: 69403ea1d9bcdf3f3deea90a

Added to database: 12/15/2025, 5:00:17 PM

Last enriched: 12/15/2025, 5:15:15 PM

Last updated: 12/15/2025, 8:39:39 PM

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats