4.3medium
An SSTI (Server-Side Template Injection) vulnerability exists in the gettermsandconditions method of Frappe ERPNext through 15.89.0.
- Severity
- 4.3medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.36% (higher than 31% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| frappe erpnext | up to 15.89.0 | NVD |
All scores
| CISA-ADP | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
Classification
What each source says
CVE List
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.
NVD (es)
Una vulnerabilidad SSTI (Server-Side Template Injection) existe en el método get_terms_and_conditions de Frappe ERPNext hasta la versión 15.89.0. La función renderiza plantillas Jinja2 controladas por el atacante ('terms') utilizando frappe.render_template() con un contexto proporcionado por el usuario ('doc'). Aunque Frappe utiliza un SandboxedEnvironment personalizado, varias variables globales peligrosas como frappe.db.sql siguen estando disponibles en el contexto de ejecución a través de get_safe_globals(). Un atacante autenticado con acceso para crear o modificar un documento de Términos y Condiciones puede inyectar expresiones Jinja arbitrarias en el campo 'terms', lo que resulta en la ejecución de código del lado del servidor dentro de un contexto restringido pero aún inseguro. Esta vulnerabilidad puede utilizarse para filtrar información de la base de datos.
References
| https://www.notion.so/SSTI-bug-3-239e6086eadc8020aeecdaf123e32f3d?source=copy_link | exploit, third-party-advisory | |
| https://iamanc.github.io/post/erpnext-ssti-bug-3 | exploit, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-66436 changed 2025-12-17 | CVE Terms of Use |
| NVD | CVE-2025-66436 changed 2026-10-14 | Public domain |