SecurityContext

CVE-2025-66436: Frappe ERPNext - Server-Side Template Injection

  • Cve: CVE-2025-66436
  • Name: Frappe ERPNext - Server-Side Template Injection
  • Description: An SSTI (Server-Side Template Injection) vulnerability exists in the get_terms_and_conditions method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (terms) using frappe.render_template() with a user-supplied context (doc). Although Frappe uses a custom SandboxedEnvironment, several dangerous globals such as frappe.db.sql are still available in the execution context via get_safe_globals(). An authenticated attacker with access to create or modify a Terms and Conditions document can inject arbitrary Jinja expressions into the terms field, resulting in server-side code execution within a restricted but still unsafe context. This vulnerability can be used to leak database information.
  • Impact: Authenticated attackers can execute server-side code and leak database information, potentially compromising sensitive data.
  • Remediation: Update to a version later than 15.89.0 or apply patches that remove dangerous globals from the template context.
  • Vulnerability type: template_injection
  • Vulnerability impact: remote_code_execution, information_disclosure
  • Requirement type: logged_in
  • Requirements: Attacker must be authenticated and able to create or modify Terms and Conditions document
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 4.3
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
  • Epss score: 0.00361
  • Epss percentile: 0.30216
  • Assignee: [email protected]
  • Published at: 2025-12-15T18:15:48Z
  • Age in days: 344
  • Modified at: 2026-10-14T13:10:00Z
  • Public exploits total: 2
  • References total: 2
  • Products total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-66436
  • Nvd status: analyzed
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-94Improper Control of Generation of Code
CWE-1336Improper Neutralization of Special Elements Used in a Template Engine

Public exploits

UrlSourceAdded date
https://iamanc.github.io/post/erpnext-ssti-bug-3nvd2025-12-15
https://www.notion.so/SSTI-bug-3-239e6086eadc8020aeecdaf123e32f3d?source=copy_linknvd2025-12-15

References

UrlSourceTags
https://iamanc.github.io/post/erpnext-ssti-bug-3nvdExploit, Third Party Advisory
https://www.notion.so/SSTI-bug-3-239e6086eadc8020aeecdaf123e32f3d?source=copy_linknvdExploit, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
frappe:erpnext<= 15.89.0nonvd/v1/products/frappe/erpnext

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 2
  • Public exploit first date: 2025-12-15
  • Remote: yes
  • Authentication required: yes
  • Exposed hosts: 657
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports