Description
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.
Published: 2026-07-01
Score: 6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Craft CMS allows users with the utility:system-messages permission to embed arbitrary dataUrl() Twig function payloads into system email templates. Because dataUrl() was mistakenly included in the Twig sandbox allowlist, the server reads the specified file and returns its contents as a URL in the email body. The .env file, which stores the database credentials, CRAFT_SECURITY_KEY, and third‑party API keys, passes all existing protection checks and is fully exfiltrated. This is a sensitive file disclosure flaw identified as CWE-200, and possession of the CRAFT_SECURITY_KEY allows an attacker to forge session tokens and take full administrative control of the site.

Affected Systems

The flaw affects Craft CMS 4.0.0-RC1 through 4.17.x and 5.0.0-RC1 through 5.9.x. 4.18.0 and 5.10.0, where dataUrl .env file no longer can be read via email templates.

Risk and Exploitability

The CVSS base score is 6, indicating moderate severity. The EPSS score is <1%, pointing to a very low likelihood of exploitation in the wild. This vulnerability is not listed in the CISA KEV catalog. An attacker would need an authenticated control panel user with the utility:system-messages permission to embed a malicious payload; this user could then read arbitrary files, exfiltrate the .env contents, and if the CRAFT_SECURITY_KEY is compromised, forge session tokens to achieve full admin takeover. In environments where the permission is tightly controlled, the risk is lowered, but the possibility of critical deployments.

Generated by OpenCVE AI on July 21, 2026 at 12:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update to the latest fixed versions of Craft CMS (4.18.0 or newer, 5.10.0 or newer) to remove dataUrl() from the sandbox allowlist.
  • Restrict the utility:system-messages permission to trusted administrators only, preventing untrusted users from modifying system email templates.
  • After upgrading or if a compromise is suspected, rotate the CRAFT_SECURITY_KEY and any other sensitive values stored in the .env file and restart the application to invalidate any forged session tokens.

Generated by OpenCVE AI on July 21, 2026 at 12:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-287w-mxq6-x2cp Craft CMS: Sensitive File Disclosure / Server-Side File Read
History

Thu, 02 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 01 Jul 2026 23:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Craft CMS: Sensitive File Disclosure / Server-Side File Read
Weaknesses CWE-200
References
Metrics cvssV4_0

{'score': 6, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-02T14:49:11.273Z

Reserved: 2026-06-17T14:40:28.380Z

Link: CVE-2026-55792

cve-icon Vulnrichment

Updated: 2026-07-02T14:49:04.851Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-21T12:45:02Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor