Skip to main content

Craft CMS EUVDEUVD-2026-41212

| CVE-2026-55792 MEDIUM
Information Exposure (CWE-200)
2026-07-02 security-advisories@github.com GHSA-287w-mxq6-x2cp
6.0
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

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

  1. Recon
    Authenticate to Craft CMS control panel
  2. Delivery
    Leverage utility:system-messages permission to edit email template
  3. Exploit
    Inject dataUrl('.env') payload into template body
  4. Install
    Trigger system email send to attacker-controlled address
  5. C2
    Decode base64-encoded .env file contents from email
  6. Execute
    Extract CRAFT_SECURITY_KEY and database credentials
  7. Impact
    Forge admin session token for full account takeover

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires two concurrent conditions: first, the attacker must have authenticated access to the Craft CMS control panel (a valid user account); second, the utility:system-messages permission must be explicitly delegated to that user or their group by an administrator - this is not a default permission and must be intentionally granted. The vulnerability is then exercised entirely through the normal email template editing interface, with no additional tooling required beyond the ability to craft a Twig template payload. Exploitation is bounded to Craft CMS 4.0.0-RC1 through 4.17.x and 5.0.0-RC1 through 5.9.x; patched versions 4.18.0 and 5.10.0 are not affected. The following factors limit realistic exploitability: the attacker must already possess a control panel account with non-default elevated template permissions; administrators who restrict the utility:system-messages grant to only themselves are not vulnerable to insider exploitation. No special network position, protocol exploit, or non-default CMS feature beyond the permission delegation is required.

Impact

The CVSS 4.0 score of 6.0 (AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N) is technically accurate but understates the operational risk. The AT:P designation correctly captures the permission prerequisite (utility:system-messages must be explicitly delegated), and VC:H reflects the direct confidentiality loss. However, the real-world blast radius exceeds what these base metrics convey: .env exfiltration delivers CRAFT_SECURITY_KEY, database credentials, and third-party API keys in a single read, and the security key specifically enables session forgery and full administrator takeover - a privilege escalation chain not captured in the base score. EPSS data was not provided, preventing probability-of-exploitation comparison. There is no CISA KEV listing, and no POC code has been identified, indicating no confirmed widespread active exploitation at time of analysis. The primary constraint limiting exploitability is the required pre-existing control panel access with explicitly delegated utility:system-messages permission - this is not a default configuration and must be granted by an administrator, meaningfully narrowing the attacker pool. Defenders operating Craft deployments with non-administrator users holding this permission should treat patching as urgent regardless of the moderate base score, given the high-impact privilege escalation chain reachable post-exfiltration.

Exploit ScenarioDerived

An attacker who has been granted the utility:system-messages permission in Craft CMS - for example, a trusted content editor or marketing team member - edits a system email template to include a dataUrl('/var/www/html/.env') call, then triggers a test or legitimate send of that email to an address they control. Craft's email renderer executes dataUrl() server-side, reads the .env file, and embeds the full base64-encoded contents in the email body; the attacker decodes the payload, extracts CRAFT_SECURITY_KEY, and uses it to forge a session cookie for an administrator account, achieving full CMS control. No public exploit code has been identified at time of analysis, but the exploitation technique is straightforwardly derivable from the public advisory description.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 02, 2026

Server-side file exfiltration in Craft CMS versions 4.0.0-RC1 through 4.17.x and 5.0.0-RC1 through 5.9.x allows any control panel user granted the utility:system-messages permission to embed a dataUrl() Twig payload into system email templates, causing the server to read and base64-encode arbitrary files - including the .env file - into outbound email bodies. Exfiltration of CRAFT_SECURITY_KEY from the .env file enables an attacker to forge valid session tokens and escalate to full administrator account takeover, chaining a confidentiality breach into complete privilege escalation. No public exploit has been identified at time of analysis; patches are available in 4.18.0 and 5.10.0.

RemediationAI

Upgrade to Craft CMS 4.18.0 (for 4.x deployments) or 5.10.0 (for 5.x deployments), which resolve this issue by restricting or removing dataUrl() from the Twig sandbox allowlist. The upstream fix is documented in GitHub PR #18559 at https://github.com/craftcms/cms/pull/18559 and the full security advisory at https://github.com/craftcms/cms/security/advisories/GHSA-287w-mxq6-x2cp. As an immediate compensating control prior to patching, revoke the utility:system-messages permission from all non-administrator user groups - this eliminates the exploitable attack surface at the cost of restricting who can manage system email templates, which may impact content editor workflows. Additionally, if there is any possibility the permission has been misused or the deployment has been targeted, rotate CRAFT_SECURITY_KEY in the .env file immediately (which invalidates all existing sessions and any tokens forged from an exposed key), rotate the database password, and regenerate all third-party API keys stored in .env. A patched version (upstream fix via PR; no separately tagged release artifact has been independently confirmed beyond the advisory's stated fix versions) should be deployed as soon as operationally feasible.

Affected VersionsENISA

CMS 4.0.0-RC1, < 4.18.0
CMS 5.0.0-RC1, < 5.10.0

Affected Packages

composer craftcms/cms fix: 4.18.0, 5.10.0
euvd cms_4_0_0_rc1 fix: 4.18.0
euvd cms_5_0_0_rc1 fix: 5.10.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in composer, euvd

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

Technical ContextAI · show details

Craft CMS uses the Twig templating engine with a sandboxed function allowlist intended to restrict what unprivileged control panel users can invoke. The dataUrl() function - designed to embed binary file contents as base64-encoded data URIs directly in HTML and email output - was included in this allowlist without restricting which filesystem paths it could target. At email render time, the PHP application calls dataUrl() server-side, reads the named file from the local filesystem, and encodes its contents into the outgoing email body, completely bypassing Craft's stated dataUrl() protection checks. This constitutes a CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) flaw rooted in insufficient sandbox policy: the allowlisted function had unrestricted filesystem read access. The .env file, which in standard Craft deployments contains CRAFT_SECURITY_KEY (used to sign and verify session tokens), the database password, and third-party API credentials, is directly readable via this vector. CPE strings were not provided in the NVD data at time of analysis; affected versions are confirmed via GitHub Security Advisory GHSA-287w-mxq6-x2cp.

Know when the next one hits your stack

  • 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) PRIMARY 6.0 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Network-accessible exploit via email template rendering (AV:N), low-privilege control panel permission required (PR:L), scope unchanged as impact remains within the CMS application boundary (S:U), full confidentiality loss from unrestricted .env file read (C:H).

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 06, 2026 - 23:01 EUVD

DescriptionCVE.org

Craft CMS is a content management system (CMS). In versions starting from 4.0.0-RC1 and prior to 4.18.0, and 5.0.0-RC1 and above, prior to 5.10.0, the dataUrl() Twig function is included in Craft’s Twig sandbox allowlist, allowing any control panel user granted the utility:system-messages permission to embed a file-reading payload into system email templates. When those emails are sent, the server reads the target file and returns its contents as a base64-encoded data URL embedded in the email body. The .env file, which typically contains the database password, CRAFT_SECURITY_KEY, and third-party API keys, passes all of Craft’s existing dataUrl() protection checks and is fully exfiltrated. Obtaining CRAFT_SECURITY_KEY enables an attacker to forge session tokens and escalate to full admin account takeover. This issue has been fixed in versions 4.18.0 and 5.10.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular CMS among agencies and mid-market, not universally deployed
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Related Vulnerabilities in Craft CMS Authorization and Code Execution Flaws

View all 4

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