Skip to main content

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

0
High
Published: 08/11/2026 (08/11/2026, 15:32:38 UTC)
Source: GCVE Database
Product: craftcms/cms

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.

CVSS v3.1

Score 4.5medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N

Affected software

Packagistghsa
craftcms/cms
Affected versions
>=4.0.0-RC1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 18:22:47 UTC

Technical Analysis

Craft CMS versions 4.0.0-RC1 before 4.18.2 and 5.0.0-RC1 before 5.10.6 have an arbitrary file read vulnerability via the create() Twig function. The vulnerability arises because the function restricts class instantiation with a limited blocklist that omits SplFileObject. An authenticated administrator with allowAdminChanges=true can configure a malicious entry type title or URI format that instantiates SplFileObject in a non-sandboxed template context. When a user creates an entry in the affected section, arbitrary files on the server, including sensitive files like .env, can be read and exposed as entry titles.

Potential Impact

An authenticated administrator with allowAdminChanges=true can exploit this vulnerability to read arbitrary files on the server, including sensitive configuration files such as .env that may contain security keys and database credentials. This leads to confidentiality breaches but does not affect integrity or availability. The vulnerability requires high privileges (administrator) and user interaction (creating an entry).

Mitigation Recommendations

No explicit patch links are provided in the input data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until patched, restrict administrator permissions and the allowAdminChanges setting to trusted users only. Monitor vendor advisories for updates and apply official fixes once available.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-2p2v-3mjg-gfpf
Osv Schema Version
1.4.0
Ecosystems
["Packagist"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a9845c9acd9273b496b0055

Added to database: 09/02/2026, 15:50:33 UTC

Last enriched: 09/07/2026, 18:22:47 UTC

Last updated: 10/04/2026, 01:11:35 UTC

Views: 80

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses