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-66436: n/a

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

Description

CVE-2025-66436 is a Server-Side Template Injection (SSTI) vulnerability in Frappe ERPNext versions through 15. 89. 0. It arises from the get_terms_and_conditions method rendering attacker-controlled Jinja2 templates with a user-supplied context. Despite using a custom SandboxedEnvironment, dangerous globals like frappe. db. sql remain accessible, enabling authenticated attackers who can create or modify Terms and Conditions documents to execute arbitrary server-side code. This can lead to unauthorized database information disclosure and potentially further compromise. Exploitation requires authentication and the ability to modify specific documents but does not require user interaction beyond that. No CVSS score is assigned yet, but the vulnerability is severe due to the potential for code execution and data leakage.

AI-Powered Analysis

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

Technical Analysis

CVE-2025-66436 is a critical Server-Side Template Injection vulnerability found in the get_terms_and_conditions method of Frappe ERPNext versions up to 15.89.0. The vulnerability stems from the method rendering Jinja2 templates that are attacker-controlled via the 'terms' field, using frappe.render_template() with a user-supplied context object 'doc'. Although Frappe employs a custom SandboxedEnvironment intended to restrict template execution, it still exposes dangerous global functions, notably frappe.db.sql, through get_safe_globals(). This exposure allows an authenticated attacker, who has permissions to create or modify Terms and Conditions documents, to inject arbitrary Jinja2 expressions. These expressions can execute server-side code within the template rendering context, which, while restricted, is still unsafe. The attacker can leverage this to perform unauthorized database queries, leading to sensitive data leakage. The vulnerability requires authentication and specific document modification privileges but does not require additional user interaction. No known exploits are reported in the wild yet, and no CVSS score has been assigned. However, the ability to execute server-side code and access database functions makes this a high-risk vulnerability. The lack of a patch link suggests that remediation may require updates from the vendor or manual mitigation steps. Organizations using ERPNext should review access controls, restrict permissions to modify Terms and Conditions documents, and monitor for suspicious template modifications.

Potential Impact

For European organizations, this vulnerability poses a significant risk to confidentiality and integrity of sensitive business data managed within ERPNext systems. Since ERPNext is widely used for enterprise resource planning, unauthorized database access could expose financial records, customer data, and operational details. The ability to execute server-side code could also lead to further system compromise, lateral movement, or data exfiltration. Organizations in sectors such as manufacturing, retail, and services that rely on ERPNext for critical business functions may face operational disruptions and regulatory compliance issues, especially under GDPR mandates concerning data protection. The requirement for authenticated access limits the attack surface but insider threats or compromised credentials could enable exploitation. Additionally, the absence of a patch increases the urgency for immediate mitigation. The impact extends to trust and reputation damage if sensitive information is leaked or systems are disrupted.

Mitigation Recommendations

1. Immediately audit and restrict permissions to create or modify Terms and Conditions documents within ERPNext, limiting this capability to trusted administrators only. 2. Implement strict access controls and multi-factor authentication to reduce the risk of credential compromise. 3. Monitor logs for unusual template modifications or access patterns related to Terms and Conditions documents. 4. If possible, disable or restrict the use of dynamic template rendering features until a vendor patch is available. 5. Engage with the ERPNext vendor or community to obtain patches or updates addressing this vulnerability. 6. Consider deploying web application firewalls (WAF) with custom rules to detect and block suspicious Jinja2 template payloads. 7. Conduct internal security awareness training to highlight the risks of template injection and the importance of safeguarding administrative credentials. 8. Review and harden the custom SandboxedEnvironment configuration to remove or restrict dangerous globals like frappe.db.sql. 9. Perform regular security assessments and penetration tests focusing on template injection vectors. 10. Prepare incident response plans to quickly address potential exploitation scenarios.

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: 694045bfd9bcdf3f3df2be97

Added to database: 12/15/2025, 5:30:39 PM

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

Last updated: 12/16/2025, 1:05:11 AM

Views: 9

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