craftcms/cms · Duplicate Advisory: Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts
Affects craftcms/cmsSource GCVE Database
CVSS 4.5 Medium.
Data as of 7 Sep 2026, 18:22 UTC
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:NWhat to do
Affected software
| Product | 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
No explicit patch links are provided in the input data. Until patched, restrict administrator permissions and the allowAdminChanges setting to trusted users only. Monitor vendor advisories for updates and apply official fixes once available.
Description
Craft CMS versions 4.0.0-RC1 through before 4.18.2 and 5.0.0-RC1 through before 5.10.6 contain an arbitrary file read vulnerability. This occurs because the create() Twig function's class instantiation blocklist does not include SplFileObject, allowing an authenticated administrator with allowAdminChanges=true to instantiate SplFileObject in a non-sandboxed template context. This can lead to arbitrary files on the server, such as .env files containing sensitive credentials, being read and rendered in entry titles.