# CVE-2025-66436: An SSTI (Server-Side Template Injection) vulnerability exists in the gettermsandconditions method of Frappe ERPNext through 15.89.0.

- Severity: Medium 4.3 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 31% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2025-12-15T00:00:00.000Z
- Modified: 2026-10-14T13:10:00.187Z
- Weaknesses: CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- frappe erpnext: up to 15.89.0

## Every score

- CISA-ADP: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`

## 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

- CVE List: [CVE-2025-66436](https://www.cve.org/CVERecord?id=CVE-2025-66436), CVE Terms of Use, modified 2025-12-17
- NVD: [CVE-2025-66436](https://nvd.nist.gov/vuln/detail/CVE-2025-66436), Public domain, modified 2026-10-14

---

Page: https://cve.day/CVE-2025-66436 · Whole record: https://cve.day/CVE-2025-66436.json · Rebuilt by cve.day 2026-11-25T22:59:09.413Z
