CVE-2025-66434 Code injection in n/a

High 8.8 Published Updated

Authenticated attackers can inject Jinja templates in ERPNext to execute code and leak database information via unsafe globals.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-66434?

CVE-2025-66434 is a high-severity code injection vulnerability in Frappe Erpnext, published on 15 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-94, CWE-1336

Which versions are affected by CVE-2025-66434?

It affects 1 product.

Products include Frappe Erpnext.

How do I fix CVE-2025-66434?

No fix has been published for CVE-2025-66434 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-66434 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66434 exists.

All Frappe Erpnext vulnerabilities

Sources

Also known as GHSA-gmxm-2p67-967r.

Is CVE-2025-66434 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free