Intel

AIKIDO-2026-92386

craftcms/cms is vulnerable to Arbitrary File Read

Arbitrary File ReadGHSA-957r-qf9p-67xw Published 3 days ago

30

Low Risk

This Affects:

PHPcraftcms/cms
4.0.0 - 4.18.1
Fixed in 4.18.2
5.0.0 - 5.10.5
Fixed in 5.10.6
Are you affected? Scan for Free

TL;DR

The Twig create function in Craft CMS instantiates arbitrary PHP classes restricted only by a short blocklist that omits the file-object class. In non-sandboxed admin-configured contexts such as entry-type title and URI formats, this enables reading arbitrary files from the server, including environment files with the security key and database credentials. Exploitation requires admin access with administrative changes allowed, and file contents are surfaced as rendered entry titles. The fix adds the file-reading class to the blocklist.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you allow administrative changes so entry-type title or URI formats can be edited.

Background info

craftcms/cms is vulnerable to Arbitrary File Read in versions 4.0.0 - 4.18.1 and 5.0.0 - 5.10.5.

How to fix this

Upgrade the craftcms/cms library to the patch version.