CVE-2025-66434

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*

History

14 Oct 2026, 13:10

Type Values Removed Values Added
Summary
  • (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.

Information

Published : 2025-12-15 17:15

Updated : 2026-10-14 13:10


NVD link : CVE-2025-66434

Mitre link : CVE-2025-66434

CVE.ORG link : CVE-2025-66434


JSON object : View

Products Affected

frappe

  • erpnext
CWE
CWE-94

Improper Control of Generation of Code ('Code Injection')

CWE-1336

Improper Neutralization of Special Elements Used in a Template Engine