CVE-2026-55792

Craft CMS: Sensitive File Disclosure / Server-Side File Read

Published Jul 1, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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 allated. 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 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.

Remediation

No solution or workaround provided in the CVE record.

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 August 1, 2026 at 22:19 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
Type Values Removed Values Added
First Time appeared Craftcms
Craftcms craftcms
Vendors & Products Craftcms
Craftcms craftcms
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 2, 2026, 2:49 PM
Reserved
Jun 17, 2026, 2:40 PM
Status
Deferred
Published
Jul 2, 2026, 12:16 AM
Modified
Oct 25, 2026, 9:10 PM