CVE-2025-66434
JSON

8.8high

An SSTI (Server-Side Template Injection) vulnerability exists in the getdunninglettertext method of Frappe ERPNext through 15.89.0.

Severity
8.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.63% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

An SSTI (Server-Side Template Injection) vulnerability exists in the get_dunning_letter_text method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (body_text) 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 configure Dunning Type and its child table Dunning Letter Text can inject arbitrary Jinja expressions, resulting in server-side code execution within a restricted but still unsafe context. This can leak database information.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
frappe erpnextup to 15.89.0NVD

All scores

CISA-ADP8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-94CWE-1336

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

An SSTI (Server-Side Template Injection) vulnerability exists in the get_dunning_letter_text method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (body_text) 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 configure Dunning Type and its child table Dunning Letter Text can inject arbitrary Jinja expressions, resulting in server-side code execution within a restricted but still unsafe context. This can leak database information.

NVD (es)

Una vulnerabilidad SSTI (Server-Side Template Injection) existe en el método get_dunning_letter_text de Frappe ERPNext a través de la versión 15.89.0. La función renderiza plantillas Jinja2 controladas por el atacante (body_text) 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 configurar Dunning Type y su tabla hija Dunning Letter Text puede inyectar expresiones Jinja arbitrarias, lo que resulta en ejecución de código del lado del servidor dentro de un contexto restringido pero aún inseguro. Esto puede filtrar información de la base de datos.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-66434 changed 2026-11-03CVE Terms of Use
NVDCVE-2025-66434 changed 2026-10-14Public domain