Skip to main content

ERPNext CVE-2026-65974

| EUVDEUVD-2026-60451 CRITICAL
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-08-17 GitHub_M
9.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate as limited ERPNext user
  2. Delivery
    Reach template-rendering feature
  3. Exploit
    Inject malicious Jinja/SSTI payload
  4. Install
    render_template runs without restrict_globals
  5. C2
    Escape safe_exec sandbox
  6. Execute
    Execute OS commands as server user
  7. Impact
    Full host compromise

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
Exploitation Conditions

Requires an authenticated ERPNext account (PR:L) with the ability to supply or trigger rendering of Jinja template content through a Frappe feature that routes into safe_exec's render_safe_globals - for example custom print formats, email/notification templates, web templates/pages, or server scripts that call render_template. The limiting factor is that a fully anonymous, unauthenticated outsider cannot exploit this directly: an attacker must first hold at least a low-privilege ('limited') user role and reach a template-authoring or template-execution surface. No special non-default configuration is needed beyond having such users, and no victim interaction is required; any ERPNext instance before 15.111.0 / 16.22.0 that grants semi-trusted users template-editing capability is exposed.

Impact

The signals are largely aligned toward high priority: the CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H = 9.9) describes a network-reachable, low-complexity attack needing only limited privileges and no user interaction, with a scope change reflecting sandbox escape to full host compromise. SSTI leading to RCE is a well-understood, reliable exploitation class, so the modest PR:L barrier (any authenticated ERPNext user who can reach a template-rendering feature) is the main gating factor rather than a strong mitigant. No EPSS score is provided and the CVE is not in CISA KEV, and no POC is referenced, so there is no evidence of active or automated exploitation yet - but the patch commit is public, which materially lowers the effort to reconstruct a working exploit. Because ERPNext instances are frequently multi-tenant or exposed to semi-trusted internal users, any operator running a version prior to 15.111.0 or 16.22.0 should treat this as urgent and patch promptly rather than waiting for in-the-wild reports.

Exploit ScenarioDerived

A low-privileged ERPNext user with access to a feature that renders Jinja (such as a custom print format, notification template, or web template) injects a template payload like {{ ...os.popen('id')... }} that, once rendered by the unrestricted render_template inside safe_exec, executes attacker-controlled OS commands on the server. Because the vector is network-based with low complexity and no user interaction, the attacker only needs a valid limited account; no public POC is referenced, but the SSTI-to-RCE pattern is straightforward to weaponize from the public fix diff.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 17, 2026

Server-side template injection in ERPNext (Frappe framework) lets low-privileged authenticated users escape the Frappe safe-execution sandbox and achieve remote code execution on the server. The root cause is that frappe.render_template was exposed inside the safe_exec globals without forcing restrict_globals, so a user who can supply template content crosses a permission boundary into unrestricted Jinja evaluation. Rated CVSS 9.9 with a scope change; no public exploit code or CISA KEV listing is identified at time of analysis, but the fix commit is public, narrowing the reversing effort required.

RemediationAI

Vendor-released patch: upgrade ERPNext to 15.111.0 (for 15.x deployments) or 16.22.0 (for 16.x deployments), which pull in the corrected Frappe render_template handling; ensure the bundled Frappe framework is updated alongside ERPNext so commit 529d190a is present. Follow the advisory at https://github.com/frappe/erpnext/security/advisories/GHSA-w996-r7v3-87wr. If you cannot patch immediately, reduce exposure by tightening who holds authenticated accounts and by restricting or disabling features that let non-admin users author or submit Jinja templates (for example custom print formats, notification/email templates, web page and web template records, and server-script or report contexts that call render_template); auditing and locking down these template-editing permissions is the most direct compensating control, with the trade-off that legitimate users who rely on custom print formats or notifications will lose self-service template editing until patched. Also place the ERP behind network access controls so only trusted users can reach the application, accepting that this does not protect against a malicious or compromised internal account.

Affected VersionsENISA

ERPNext 16.0.0, < 16.22.0
ERPNext < 15.111.0

Affected Packages

euvd erpnext fix: 15.111.0, 16.22.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ERPNext is built on the Frappe web framework, which offers a 'safe execution' sandbox (frappe/utils/safe_exec.py) for running user- or app-supplied Python and Jinja templates with a restricted global namespace. Jinja rendering in Frappe is normally hardened by a restrict_globals flag that strips dangerous callables from the template context. The vulnerability (CWE-1336, Server-Side Template Injection / improper neutralization of special elements in a template engine) arises because render_safe_globals() bound the raw frappe.render_template into the sandbox rather than a wrapper enforcing restrict_globals=True. The public fix (frappe commit 529d190a) introduces a safe_render_template shim that pops any caller-supplied restrict_globals and hard-codes restrict_globals=True, changes render_template's signature to make restrict_globals keyword-only (preventing positional bypass), and only re-exposes the unrestricted render_template inside the higher-trust exec_safe_globals path.

Know when Erpnext gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 9.9 CRITICAL

Network-reachable SSTI needing only a low-privilege account (PR:L, AV:N, AC:L, no UI); sandbox escape to host justifies scope change and full C/I/A impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Aug 17, 2026 - 22:03 EUVD
CVE Published
Aug 17, 2026 - 20:44 cve.org
CRITICAL 9.9

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

ERPNext deployments face a critical remote code execution vulnerability allowing any authenticated user to execute arbitrary server code by injecting malicious Jinja templates; no public exploit code has been identified, but the vulnerability enables full system compromise. With no vendor patch currently available, organizations must immediately limit user access to template functions and implement compensating controls to prevent data breach and operational disruption.

Business Impact: Severe
Compensating Controls

Restrict template-rendering functionality to essential personnel via role-based access control; deploy WAF rules to block Jinja template syntax ({% %}, {{ }}, {

#}) in user inputs; establish real-time monitoring and alerting for suspicious template-related API calls and error patterns; segregate ERPNext from other production systems to limit lateral movement in case of compromise; require multi-factor authentication for accounts with template permissions; disable frappe.render_template in safe_exec contexts if not operationally critical; maintain tested daily incremental backups; conduct weekly access reviews of users with template-rendering permissions.

Threat Intelligence Overview

EPSS Score
0.6%
Top 56% exploitable
Prevalence
Medium
popular open-source ERP, common in SMBs but not ubiquitous infrastructure
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

51
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-67289 CRITICAL POC
9.6 Dec 22

Stored cross-site scripting leading to code execution in Frappe Framework 15.89.0 (and the ERPNext application built on

CVE-2018-3885 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2018-3884 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2018-3883 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2018-3882 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2025-66440 HIGH POC
8.8 Dec 15

Authenticated SQL injection in Frappe ERPNext through 15.89.0 allows low-privilege users to extract arbitrary database c

CVE-2025-66439 HIGH POC
8.8 Dec 15

SQL injection in Frappe ERPNext through 15.89.0 lets an authenticated attacker with a valid session and access to the Pa

CVE-2025-66438 HIGH POC
8.8 Dec 15

Authenticated attackers with permission to create or modify Print Format documents in Frappe ERPNext through 15.89.0 can

CVE-2025-66437 HIGH POC
8.8 Dec 15

Authenticated server-side template injection in Frappe ERPNext through 15.89.0 lets a user who can create or modify an A

CVE-2025-66434 HIGH POC
8.8 Dec 15

Authenticated server-side template injection in Frappe ERPNext through 15.89.0 allows users with privileges to configure

CVE-2020-6145 HIGH POC
8.8 Aug 10

An SQL injection vulnerability exists in the frappe.desk.reportview.get functionality of ERPNext 11.1.38. Rated high sev

CVE-2023-54345 HIGH POC
8.7 May 05

Frappe Framework ERPNext 13.4.0 contains a sandbox escape vulnerability in RestrictedPython that allows authenticated us

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy