{"id":"CVE-2025-66435","sourceIdentifier":"cve@mitre.org","published":"2025-12-15T17:15:53.853","lastModified":"2026-10-14T13:10:00.187","vulnStatus":"Analyzed","cveTags":[],"descriptions":[{"lang":"en","value":"An SSTI (Server-Side Template Injection) vulnerability exists in the get_contract_template method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (contract_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 Contract Template can inject arbitrary Jinja expressions into the contract_terms field, resulting in server-side code execution within a restricted but still unsafe context. This vulnerability can be used to leak database information."},{"lang":"es","value":"Una vulnerabilidad SSTI (Server-Side Template Injection) existe en el método get_contract_template de Frappe ERPNext hasta la versión 15.89.0. La función renderiza plantillas Jinja2 controladas por el atacante (contract_terms) usando frappe.render_template() con un contexto proporcionado por el usuario (doc). Aunque Frappe usa un SandboxedEnvironment personalizado, varias globales peligrosas como frappe.db.sql todavía están disponibles en el contexto de ejecución a través de get_safe_globals(). Un atacante autenticado con acceso para crear o modificar una Plantilla de Contrato puede inyectar expresiones Jinja arbitrarias en el campo contract_terms, resultando en ejecución de código del lado del servidor dentro de un contexto restringido pero aún inseguro. Esta vulnerabilidad puede ser usada para filtrar información de la base de datos."}],"affected":[{"source":"cve@mitre.org","affectedData":[{"vendor":"n/a","product":"n/a","versions":[{"version":"n/a","status":"affected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","baseScore":4.3,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"NONE","availabilityImpact":"NONE"},"exploitabilityScore":2.8,"impactScore":1.4},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","baseScore":4.3,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"NONE","availabilityImpact":"NONE"},"exploitabilityScore":2.8,"impactScore":1.4}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2025-12-16T18:44:07.911988Z","id":"CVE-2025-66435","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"nvd@nist.gov","type":"Primary","description":[{"lang":"en","value":"CWE-94"}]},{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","description":[{"lang":"en","value":"CWE-1336"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*","versionEndIncluding":"15.89.0","matchCriteriaId":"DAA2FB4F-48C5-4BA5-A15F-175B8A752866"}]}]}],"references":[{"url":"https://iamanc.github.io/post/erpnext-ssti-bug-2","source":"cve@mitre.org","tags":["Exploit","Third Party Advisory"]},{"url":"https://www.notion.so/SSTI-bug-2-239e6086eadc80878e8fcc7b6c26a584?source=copy_link","source":"cve@mitre.org","tags":["Exploit","Third Party Advisory"]}]}