Duplicate Advisory: Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts
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
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.