Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to Craft CMS control panel
-
DeliveryLeverage utility:system-messages permission to edit email template
-
ExploitInject dataUrl('.env') payload into template body
-
InstallTrigger system email send to attacker-controlled address
-
C2Decode base64-encoded .env file contents from email
-
ExecuteExtract CRAFT_SECURITY_KEY and database credentials
-
ImpactForge 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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).
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-41212
GHSA-287w-mxq6-x2cp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB