Skip to main content
VulnerabilityPublished Updated

CVE-2026-72779: Craft CMS · Arbitrary file read via SplFileObject in non-sandboxed template contexts

Affects craftcms/cmsSource GCVE Database

0

Mentioned vulnerabilities

CVSS 6.9 Medium : upgrade to 5.10.6 when convenient.

Data as of 13 Sep 2026, 15:02 UTC

CVSS 4.0 base score
6.9Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 5.10.6, 4.18.2
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

What to do

Upgrade craftcms/cms to 5.10.6; craftcms/cms to 4.18.2.

Affected software

ProductAffectedFixed in
Packagistcraftcms/cmsAffected
  • >=5.0.0-RC1 <5.10.6
Fixed in
  • 5.10.6
Packagistcraftcms/cmsAffected
  • >=4.0.0-RC1 <4.18.2
Fixed in
  • 4.18.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available for this vulnerability and should be applied to affected Craft CMS versions. Additionally, production environments should ensure that the `allowAdminChanges` setting is set to false, which prevents entry type configuration changes and mitigates this vulnerability. The Twig sandbox already blocks the `create()` function in system email templates, so no action is required for those contexts.

Description

Craft CMS versions 4.0.0-RC1 up to but not including 4.18.2, and 5.0.0-RC1 up to but not including 5.10.6, contain a vulnerability in the Twig `create()` function that allows an admin user to read arbitrary files on the server. This is possible because the `create()` function can instantiate PHP classes like SplFileObject, which is not blocked, enabling file reads from non-sandboxed template contexts such as entry type title and URI formats. Exploitation requires admin access and the configuration setting `allowAdminChanges` to be true, which is typically disabled in production. The vulnerability exposes sensitive files like `.env` containing security keys and database credentials. The Twig sandbox blocks this function in system email templates, limiting the attack surface. A patch is available for this vulnerability.

References

Community reviews

Loading reviews…