CVE-2026-65974 ERPNext: Server-Side Template Injection leading to Remote Code Execution

Critical 9.9 Published Updated

Authenticated users can execute arbitrary code via server-side template injection in ERPNext due to unsafe template rendering, requiring an upgrade to patched versions.

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-2026-65974?

CVE-2026-65974 is a critical code injection vulnerability in frappe erpnext, published on 17 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

ERPNext is a free and open source Enterprise Resource Planning tool. Prior to 15.111.0 and 16.22.0, limited authenticated users can cross a permission boundary in Frappe safe execution because frappe.render_template is exposed without forcing restrict_globals, allowing server-side template injection and remote code execution. This issue is fixed in versions 15.111.0 and 16.22.0.

Weakness: CWE-1336

Which versions are affected by CVE-2026-65974?

How do I fix CVE-2026-65974?

No fix has been published for CVE-2026-65974 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-2026-65974 being exploited?

There is no known exploitation of CVE-2026-65974 in the wild and no public exploit code.

Sources

Also known as GHSA-w996-r7v3-87wr.

Is CVE-2026-65974 in your software?

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

Check your SBOMs for free