CVE-2026-55792: Craft CMS sensitive file disclosure via dataUrl Twig function

CVE-2026-55792 · Severity: medium · CVSS 4 · Published 2026-07-02

Craft CMS, a popular content management system, contains a vulnerability that allows certain authorized users to read sensitive server files. By modifying system email templates, an attacker can trick the server into including the contents of the site's configuration files (such as the .env file) within outgoing emails. This could lead to the exposure of database passwords and security keys, potentially allowing an attacker to take full control of the administrative account.

Technologies: craftcms/cms (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2026-55792 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-55792 being exploited in the wild.
How severe is CVE-2026-55792?
Medium severity, with a CVSS score of 4, published 2 July 2026.
Which products and versions are affected?
craftcms/cms (Packagist) ECOSYSTEM:introduced=4.0.0-RC1,fixed=4.18.0.
Is there a fix for CVE-2026-55792?
Yes. craftcms/cms (Packagist): upgrade to 4.18.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-55792 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-55792?
Check whether you run craftcms/cms (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • craftcms/cms (Packagist): upgrade to 4.18.0 or later
    composer require craftcms/cms:^4.18.0

Technical details

A sensitive file disclosure vulnerability exists in Craft CMS due to the `dataUrl()` Twig function being included in the Twig sandbox allowlist. Users with the `utility:system-messages` permission can embed this function into system email templates. The `Html::dataUrl()` helper fails to block dotfiles, allowing it to read the `.env` file located at the project root. When an email is rendered via `renderSandboxedString()`, the file content is base64-encoded and embedded in the email body. Attackers can exfiltrate the `CRAFT_SECURITY_KEY` to forge session tokens and escalate privileges to administrator. The issue is patched in versions 4.18.0 and 5.10.0.

Affected products

  • Craft CMS Craft CMS >= 4.0.0-RC1, < 4.18.0; >= 5.0.0-RC1, < 5.10.0

Identifiers

  • CVE-2026-55792
  • GHSA-287w-mxq6-x2cp

Timeline

  • 2026-06-16: disclosed: Vulnerability reported to vendor
  • 2026-07-02: advisory: NVD publication date
  • 2026-07-06: patched: GitHub Advisory published and reviewed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.