Skip to main content
VulnerabilityPublished Updated

craftcms/cms · Duplicate Advisory: Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts

Affects craftcms/cmsSource GCVE Database

0

CVSS 4.5 Medium.

Data as of 7 Sep 2026, 18:22 UTC

CVSS 3.1 base score
4.5Medium
How severe the flaw is on the 0–10 CVSS scale.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N

What to do

Affected software

ProductAffectedFixed in
Packagistcraftcms/cmsAffected
  • >=4.0.0-RC1
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.

References

Community reviews

Loading reviews…