Skip to main content
Vulnerability Database/CVE-2023-54412

CVE-2023-54412: Frappe Email Template Access Control Flaw

CVE-2023-54412 is a privilege escalation vulnerability in Frappe that allows low-privileged users to modify Email Templates through improper access controls. This article covers technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2023-54412 Overview

CVE-2023-54412 is an improper access control vulnerability [CWE-284] in the Frappe framework. Frappe versions before 13.46.3 and 14.x before 14.21.1 fail to enforce permissions on the Email Template doctype. Any authenticated non-guest user can create and edit Email Templates used by the application. On deployments where signup is enabled, self-registered users inherit this capability. Attackers can modify templates that drive transactional email content, enabling template tampering that affects downstream recipients.

Critical Impact

Low-privileged authenticated users can modify Email Templates, enabling content tampering of system-generated emails and potential phishing or social-engineering payloads delivered through trusted application channels.

Affected Products

  • Frappe framework versions prior to 13.46.3
  • Frappe framework 14.x versions prior to 14.21.1
  • Applications built on vulnerable Frappe releases (including ERPNext deployments)

Discovery Timeline

  • 2026-10-12 - CVE-2023-54412 published to NVD
  • 2026-10-14 - Last updated in NVD database

Technical Details for CVE-2023-54412

Vulnerability Analysis

Frappe exposes a document type named Email Template that stores subject lines and HTML bodies rendered when the platform sends transactional email. The framework normally enforces role-based permissions on doctypes through its permission model. In vulnerable releases, the Email Template doctype permissions allow any authenticated non-guest user to invoke create and write operations.

The practical effect is that a user holding only the default authenticated role can call standard Frappe REST and RPC endpoints to insert or modify Email Template records. There is no restriction tying template modification to administrators or email managers. On tenants that enable public signup, the attack surface grows to any unauthenticated internet user who can register an account.

Root Cause

The root cause is a missing or overly permissive permission rule on the Email Template doctype in Frappe's metadata. The permission model grants write access at a role level that includes all non-guest users, rather than restricting modification to privileged roles such as System Manager. This qualifies as a broken access control defect per [CWE-284].

Attack Vector

Exploitation requires network access to the Frappe application and a valid non-guest session. The attacker authenticates, obtains a CSRF token through the normal login flow, and submits a request to the document API to insert or update an Email Template record. The malicious template is persisted and rendered by the server the next time the application dispatches the corresponding notification. Attackers can replace legitimate password reset, invoice, or onboarding templates with content that redirects recipients to attacker-controlled infrastructure or embeds pretexts for credential harvesting.

No verified public exploit code is published. Technical specifics are available in the GitHub Security Advisory and the VulnCheck Advisory for Frappe.

Detection Methods for CVE-2023-54412

Indicators of Compromise

  • Unexpected creation or modified timestamps on records in the tabEmail Template database table attributed to non-administrative users.
  • Audit log entries showing POST /api/method/frappe.client.insert or POST /api/method/frappe.client.set_value requests targeting Email Template from low-privileged accounts.
  • Email Template bodies containing external links, unexpected <script> tags, or domains not matching organizational infrastructure.

Detection Strategies

  • Query the Frappe database for Email Template records whose owner or modified_by fields are not System Manager accounts.
  • Compare current Email Template subject and response content against a known-good baseline captured from a trusted environment.
  • Review web server access logs for document API calls targeting the Email Template doctype outside normal administrative sessions.

Monitoring Recommendations

  • Enable Frappe's Version doctype tracking on Email Template so edits are recorded with user and timestamp.
  • Forward application and web server logs to a centralized log platform and alert on write operations against the Email Template endpoint.
  • Monitor new user registrations when signup is enabled and correlate those accounts with subsequent template modification activity.

How to Mitigate CVE-2023-54412

Immediate Actions Required

  • Upgrade Frappe to version 13.46.3 or later on the 13.x branch, or 14.21.1 or later on the 14.x branch.
  • Audit all existing Email Template records for unauthorized modifications and restore trusted content from backup where tampering is suspected.
  • Disable public signup on Frappe or ERPNext deployments that do not require it until patching is complete.

Patch Information

The Frappe maintainers addressed the issue in releases 13.46.3 and 14.21.1 by tightening the permission rules on the Email Template doctype so that only privileged roles can create or edit templates. Upgrade instructions and the full change set are published in the GitHub Security Advisory GHSA-f939-v9q6-j3wg.

Workarounds

  • Edit the Email Template doctype permissions in the Role Permissions Manager to remove write and create rights from the All role and any non-administrative roles.
  • Restrict user signup to invitation only, limiting the pool of accounts that can reach the vulnerable endpoint.
  • Place the Frappe application behind an authenticated reverse proxy or network allowlist to reduce exposure of the document API to untrusted networks.
bash
# Upgrade Frappe using bench to a patched release
bench switch-to-branch version-14 frappe --upgrade
bench update --reset
bench --site all migrate

# Verify installed Frappe version is at or above the patched release
bench version | grep frappe

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.