{"id":"CVE-2026-72779","aliases":["CVE-2026-72779","GHSA-957r-qf9p-67xw"],"related":[],"kind":"vulnerability","state":"published","title":"Craft CMS 5.0.0-RC1 before 5.10.6 Arbitrary File Read via SplFileObject","summary":"Craft CMS 5.0.0-RC1 before 5.10.6 and 4.0.0-RC1 before 4.18.2 contain an arbitrary file read vulnerability. The create() Twig function restricts class instantiation using a 5-entry blocklist that does not include SplFileObject, allowing an authenticated administrator (with allowAdminChanges=true) to configure a malicious entry type title or URI format that instantiates SplFileObject in a non-sandboxed template context. When a user subsequently creates an entry in the affected section, arbitrary files on the server (such as .env containing the security key and database credentials) are read and rendered as entry titles.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Craft CMS 5.0.0-RC1 before 5.10.6 and 4.0.0-RC1 before 4.18.2 contain an arbitrary file read vulnerability. The create() Twig function restricts class instantiation using a 5-entry blocklist that does not include SplFileObject, allowing an authenticated administrator (with allowAdminChanges=true) to configure a malicious entry type title or URI format that instantiates SplFileObject in a non-sandboxed template context. When a user subsequently creates an entry in the affected section, arbitrary files on the server (such as .env containing the security key and database credentials) are read and rendered as entry titles.","source":"cvelist"},{"lang":"en","text":"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`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Craft CMS 5.0.0-RC1 anterior a 5.10.6 y 4.0.0-RC1 anterior a 4.18.2 contienen una vulnerabilidad de lectura arbitraria de archivos. La función Twig create() restringe la instanciación de clases utilizando una lista de bloqueo de 5 entradas que no incluye SplFileObject, lo que permite a un administrador autenticado (con allowAdminChanges=true) configurar un título de tipo de entrada o formato URI malicioso que instancia SplFileObject en un contexto de plantilla no aislado. Cuando un usuario crea posteriormente una entrada en la sección afectada, los archivos arbitrarios en el servidor (como .env que contiene la clave de seguridad y las credenciales de la base de datos) se leen y se renderizan como títulos de entrada.","source":"nvd"}],"published":"2026-08-06T21:54:45.000Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N","score":4.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-184"],"affected":[{"ranges":[{"type":"semver","introduced":"5.0.0-RC1","fixed":"5.10.6","status":"affected"},{"type":"semver","version":"5.10.6","status":"unaffected"}],"vendor":"craftcms","product":"cms","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0-RC1","fixed":"4.18.2","status":"affected"},{"type":"semver","version":"4.18.2","status":"unaffected"}],"vendor":"craftcms","product":"cms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0-RC1","status":"affected","fixed":"5.10.6"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0-RC1","status":"affected","fixed":"4.18.2"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-957r-qf9p-67xw","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/craft-cms-rc1-before-arbitrary-file-read-via-splfileobject","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72779","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms/commit/7c96fd73df936a10e8f85ae6ef61a9fc3f277c12","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms/commit/87978f11c8f986c40ef41b941d79547230c4d6d9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms/releases/tag/4.18.2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms/releases/tag/5.10.6","tags":["web"],"sources":["ghsa"]}],"credits":["je-lv"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-11T14:54:30.379Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-72779","url":"https://www.cve.org/CVERecord?id=CVE-2026-72779","licence":"CVE Terms of Use","modified":"2026-10-08T15:24:26.374Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-957r-qf9p-67xw","url":"https://github.com/advisories/GHSA-957r-qf9p-67xw","licence":"CC-BY-4.0","modified":"2026-09-01T21:15:07.794Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-72779","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72779","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.250Z","epss":{"score":0.00218,"percentile":0.13012,"date":"2026-12-01T12:00:22.000Z"}}