CVE-2026-72779: Craft CMS · Arbitrary file read via SplFileObject in non-sandboxed template contexts
Affects craftcms/cmsSource GCVE Database
Mentioned vulnerabilities
CVSS 6.9 Medium : upgrade to 5.10.6 when convenient.
Data as of 13 Sep 2026, 15:02 UTC
- 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:NWhat to do
Upgrade craftcms/cms to 5.10.6; craftcms/cms to 4.18.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistcraftcms/cms | Affected
| Fixed in
|
| Packagistcraftcms/cms | Affected
| Fixed in
|
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
- github.com/craftcms/cms/security/advisories/GHSA-957r-qf9p-67xw (opens in a new tab)
- github.com/craftcms/cms/commit/7c96fd73df936a10e8f85ae6ef61a9fc3f277c12 (opens in a new tab)
- github.com/craftcms/cms/commit/87978f11c8f986c40ef41b941d79547230c4d6d9 (opens in a new tab)
- github.com/craftcms/cms (opens in a new tab)
- github.com/craftcms/cms/releases/tag/4.18.2 (opens in a new tab)
- github.com/craftcms/cms/releases/tag/5.10.6 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-72779 (opens in a new tab)
- vulncheck.com/advisories/craft-cms-rc1-before-arbitrary-file-read-via-splfileobject (opens in a new tab)