CVE-2026-38431

Published May 5, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
ERPNext v15.103.1 and before is vulnerable to Server-Side Template Injection (SSTI). An attacker with permission to create or edit email templates can inject template expressions that are executed on the server when the template is rendered.

Analysis

AI-generated

Technical impact

ERPNext email templates use a server‑side rendering engine that evaluates template expressions. A user with the ability to create or edit those templates can craft expressions that are executed on the web‑server. The vulnerability allows an attacker to run arbitrary code, exfiltrate data, or compromise the system entirely. This is an instance of improper code generation via template injection, identified as CWE‑94.

Affected Systems

The flaw is present in ERPNext v15.103.1 and earlier releases. No other products or vendors are listed as affected by this CVE. Organizations using legacy ERPNext installations should verify that their instance does not fall within the vulnerable version range.

Risk and Exploitability

The vulnerability is assigned a critical CVSS score of 9.8, reflecting a high potential for system compromise. It has an EPSS score of <1%, indicating a low probability of exploitation currently, and it is not listed in the CISA KEV catalog. The attack vector requires the attacker to have permission to create or edit email templates; once authorized, the vulnerability can be triggered with minimal effort. If successful, the attacker could execute arbitrary server‑side code, leading to full system compromise.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest ERPNext release that includes the fixed email template renderer. The current vulnerable versions are v15.103.1 and earlier.
  • Revoke or limit permissions that allow users to create or edit email templates, allowing only trusted administrators to perform these actions.
  • Implement template input sanitization to reject expressions containing double braces or other template syntax, or use a whitelisting approach to restrict allowed template tags and functions.

Generated by OpenCVE AI on May 6, 2026 at 17:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Frappe
Frappe erpnext
CPEs cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*
Vendors & Products Frappe
Frappe erpnext
Type Values Removed Values Added
Title Server‑Side Template Injection in ERPNext Email Templates
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Erpnext
Erpnext erpnext
Vendors & Products Erpnext
Erpnext erpnext
Type Values Removed Values Added
Title Server‑Side Template Injection in ERPNext Email Templates
Weaknesses CWE-94
Type Values Removed Values Added
Description ERPNext v15.103.1 and before is vulnerable to Server-Side Template Injection (SSTI). An attacker with permission to create or edit email templates can inject template expressions that are executed on the server when the template is rendered.
References
Weaknesses
  • CWE-94

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

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
May 6, 2026, 3:26 PM
Reserved
Apr 6, 2026, 12:00 AM
Status
Analyzed
Published
May 5, 2026, 5:17 PM
Modified
Jul 24, 2026, 9:10 PM