CVE-2026-72779: Craft CMS Arbitrary File Read Vulnerability
MODERATECVE-2026-72779 is a MODERATE arbitrary file read vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Craft CMS libraries in the Packagist ecosystem. The issue involves arbitrary file read via splfileobject in non-sandboxed template contexts. Remediation is available by upgrading affected packages to version 5.10.6, 4.18.2.
CVE-2026-72779 at a Glance
How to Fix CVE-2026-72779
To remediate this vulnerability, upgrade all affected Craft CMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade craftcms/cms to 5.10.6
Upgrade craftcms/cms to 4.18.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for craftcms/cms
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-72779, inspect your project dependencies for Craft CMS:
inspect dependencies for craftcms/cms
Analyze the terminal output to locate any version of Craft CMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.10.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. In Craft CMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-72779 Affected Craft CMS Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
craftcms/cms
|
Packagist |
≥ 5.0.0-RC1
< 5.10.6
|
5.10.6
|
|
craftcms/cms
|
Packagist |
≥ 4.0.0-RC1
< 4.18.2
|
4.18.2
|
References
Frequently Asked Questions
What is CVE-2026-72779?
Which Craft CMS versions are affected?
What version fixes CVE-2026-72779?
Is craftcms/cms affected?
What CWE is associated with CVE-2026-72779?
How can I check Packagist dependencies for CVE-2026-72779?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-957r-qf9p-67xw",
"modified" : "2026-09-01T21:03:50Z",
"published" : "2026-08-06T21:54:45Z",
"aliases" : [ "CVE-2026-72779" ],
"summary" : "Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts",
"details" : "The `create()` Twig function (introduced in 5.9.0) allows instantiation of arbitrary PHP classes from template code, restricted only by a 5-entry blocklist. `SplFileObject` is not in the blocklist, enabling arbitrary file read, including `.env` (security key, DB credentials) and the passwd file from non-sandboxed Twig template contexts, such as entry type title formats and URI formats. \n\nThe sandbox correctly blocks `create()` in system email templates, so this finding applies only to admin-configured, non-sandboxed contexts that require `allowAdminChanges=true`.\n\n## Prerequisites\n\n- Admin access to the Craft control panel\n- `allowAdminChanges` must be `true` (default in dev/staging, recommended `false` in production)\n- Admin must be able to edit entry type settings (title format, URI format)\n- Any user who subsequently creates an entry in the affected section triggers the file read\n\n## Limitations\n\n- Requires admin-level access: not exploitable by low-privilege users\n- `allowAdminChanges` must be `true`: production best practices recommend `false`, which prevents entry type configuration changes\n- Per Craft’s own severity guidelines, findings requiring `allowAdminChanges=true` are rated low\n- The `create()` function is blocked by the Twig sandbox, so this cannot be exploited via system email templates or any other sandboxed context\n\n## Impact\n\nAn admin user (or an attacker who has compromised an admin account) can read arbitrary files from the server filesystem by setting a malicious entry type title format using `create('SplFileObject', ['/path/to/file'])`. In production environments, this exposes `.env` files containing the `CRAFT_SECURITY_KEY`, database credentials, API keys, and other secrets. The file contents are rendered as entry titles visible to any user with permission to view entries in the affected section.\n\nThe impact is limited by the requirement for admin access and `allowAdminChanges=true`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "craftcms/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0-RC1"
}, {
"fixed" : "5.10.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "craftcms/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-RC1"
}, {
"fixed" : "4.18.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/security/advisories/GHSA-957r-qf9p-67xw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-72779"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/commit/7c96fd73df936a10e8f85ae6ef61a9fc3f277c12"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/commit/87978f11c8f986c40ef41b941d79547230c4d6d9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/craftcms/cms"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/releases/tag/4.18.2"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/releases/tag/5.10.6"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/craft-cms-rc1-before-arbitrary-file-read-via-splfileobject"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-06T21:54:45Z",
"nvd_published_at" : null
}
}