Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCompromise or act as rogue Craft admin account
-
DeliveryNavigate to entry type settings with allowAdminChanges=true
-
ExploitInject create('SplFileObject', ['/path/.env']) into title format field
-
ExecutionWait for non-admin user to create entry in affected section
-
PersistNon-sandboxed Twig renders SplFileObject, reading target file
-
ImpactFile contents rendered as entry title, exposing credentials to entry viewers
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires an authenticated Craft CMS administrator account (high-privilege access to the control panel) with the ability to edit entry type settings, specifically the title format or URI format fields. The server must have allowAdminChanges set to true - this is the default in development and staging environments but Craft's production documentation explicitly recommends setting it to false, making this a non-default production condition. A second actor (any user with permission to create entries in the affected section) must subsequently create or save an entry to trigger the file read; the admin planting the payload does not immediately read the file themselves. Sandboxed Twig contexts including system email templates are NOT vulnerable - exploitation is limited to entry type title formats and URI formats. The create() function was introduced in Craft 5.9.0, so the v5 attack path applies most directly to 5.9.0-5.10.5; the v4 branch exposure derives from analogous non-sandboxed template evaluation rather than the create() function specifically. |
| Impact | The provided CVSS 4.0 vector (PR:N/UI:N) is materially inconsistent with the described exploitation conditions, which require admin-level control panel access and the non-default allowAdminChanges=true configuration - this discrepancy likely represents a scoring error and should not be used for prioritization. Real-world risk is substantially lower than the reported 8.7 score implies. In production, Craft's own documentation recommends setting allowAdminChanges=false, which eliminates the precondition entirely; this finding primarily threatens development, staging, and misconfigured production environments. Exploitation is a post-compromise or insider-threat escalation path - an attacker must already hold admin credentials before any file read occurs. No EPSS score was provided in the source data, so exploitation probability cannot be quantified. No CISA KEV listing exists and no active exploitation is confirmed. The confidentiality impact is genuinely high if triggered: .env files typically contain CRAFT_SECURITY_KEY (enabling session forgery), database credentials, and third-party API keys. The combination of high-privilege prerequisite, non-default configuration dependency, and secondary user interaction required substantially constrains the realistic attack surface. |
| Exploit ScenarioDerived | A rogue or compromised Craft CMS administrator navigates to Settings > Entry Types and edits a high-traffic section's title format to include create('SplFileObject', ['/var/www/html/.env']) within the Twig template. When a content editor subsequently creates or saves any entry in that section, Craft's non-sandboxed Twig renderer instantiates SplFileObject, reads the .env file line-by-line, and renders the file contents as the entry's title - exposing CRAFT_SECURITY_KEY, database host/credentials, and API secrets to any user who can view entries in that section. No public exploit code has been identified at time of analysis, but the GHSA advisory provides sufficient technical detail to reproduce the technique. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 11, 2026
Arbitrary file read in Craft CMS 4.x and 5.x exposes .env files, database credentials, and security keys by exploiting an incomplete blocklist in the create() Twig function that omits PHP's SplFileObject class. An authenticated administrator with allowAdminChanges=true can plant a malicious entry type title or URI format; when any user subsequently creates an entry in the affected section, the Twig renderer instantiates SplFileObject and renders the contents of arbitrary server files as entry titles. No active exploitation is confirmed (not in CISA KEV) and no public exploit code has been identified at time of analysis, but the GitHub Security Advisory GHSA-957r-qf9p-67xw provides full technical disclosure of the technique.
RemediationAI
Upgrade Craft CMS to version 5.10.6 (v5 branch) or 4.18.2 (v4 branch); these are the vendor-released patched versions confirmed by commits 7c96fd73df936a10e8f85ae6ef61a9fc3f277c12 and 87978f11c8f986c40ef41b941d79547230c4d6d9 and documented in GHSA-957r-qf9p-67xw. For environments that cannot immediately patch, setting allowAdminChanges=false in config/general.php is the highest-value compensating control - it removes the precondition needed to plant the malicious template and aligns with Craft's recommended production posture; the trade-off is that legitimate entry type configuration changes (title format, URI format) will be blocked until the flag is re-enabled. As a detection measure, audit all entry type title format and URI format fields for presence of the create() function, particularly any invocations referencing SplFileObject. Rotating CRAFT_SECURITY_KEY and database credentials is advisable if allowAdminChanges=true was enabled in production and admin accounts may have been compromised, since .env exposure enables further privilege escalation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Craft CMS is a PHP-based content management system that uses the Twig templating engine. The create() helper function, introduced in Craft 5.9.0, permits instantiation of arbitrary PHP classes from Twig template code and is restricted only by a hardcoded 5-entry blocklist - an approach classified under CWE-184 (Incomplete List of Disallowed Inputs). PHP's SplFileObject (part of the Standard PHP Library) was not included in this blocklist. Craft applies Twig sandboxing to some contexts such as system email templates, correctly blocking create() there; however, entry type title formats and URI formats execute in non-sandboxed Twig contexts with full PHP class access. This architectural split - sandbox for some contexts, blocklist for others - is the structural root cause. Affected CPEs are cpe:2.3:a:craftcms:cms covering both the 4.x branch (4.0.0-RC1 through 4.18.1) and the 5.x branch (5.0.0-RC1 through 5.10.5).
Know when Cms gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Admin-level authentication (PR:H) and a second user's active entry creation (UI:R) are both hard prerequisites; impact is confidentiality-only with no integrity or availability component.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Craft CMS 5.0.0-RC1 before 5.10.6 and 4.0.0-RC1 before 4.18.2 contain an arbitrary file read vulnerability. The create() Twig function restricts class instantiation using a 5-entry blocklist that does not include SplFileObject, allowing an authenticated administrator (with allowAdminChanges=true) to configure a malicious entry type title or URI format that instantiates SplFileObject in a non-sandboxed template context. When a user subsequently creates an entry in the affected section, arbitrary files on the server (such as .env containing the security key and database credentials) are read and rendered as entry titles.
Executive ViewAI
Craft CMS versions 4.x and 5.x contain an arbitrary file read vulnerability (CVSS 8.7) allowing authenticated administrators to expose .env files, database credentials, and security keys through incomplete Twig function blocklist validation. This credential compromise creates critical risk for database access, API authentication, and lateral movement, especially where administrative privileges are distributed or shared.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Minimize admin account grants-restrict allowAdminChanges=true to essential personnel only; (2) Store secrets in hardened secrets management systems instead of .env files; (3) Disable or restrict Twig create() function access through configuration or Web Application Firewall rules; (4) Rotate database passwords, API keys, and security tokens immediately; (5) Implement and monitor comprehensive administrator activity logging; (6) Enforce multi-factor authentication and IP-based access controls for administrator accounts.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Cayin CMS suffers from an authenticated OS semi-blind command injection vulnerability using default credentials. Rated c
Multiple integer underflows in the icmLut_allocate function in International Color Consortium (ICC) Format library (iccl
phpKF CMS 3.00 Beta allows unauthenticated PHP file upload by disguising it as a PNG, then renaming it for execution. Po
Deserialization of Untrusted Data in the Sitecore.Security.AntiCSRF (aka anti CSRF) module in Sitecore CMS 7.0 to 7.2 an
Unauthenticated SQL injection in Craft CMS 4.0.0 before 4.18.9 and 5.0.0 before 5.11.2 allows remote attackers to read a
Deserialization of Untrusted Data in the anti CSRF module in Sitecore through 9.1 allows an authenticated attacker to ex
Unauthenticated file disclosure in LavaLite CMS through 10.1.2 allows remote attackers to download private stored files
Authenticated remote code execution in Craft CMS versions 5.5.0 through 5.9.13 allows admin users to execute arbitrary P
SQL injection vulnerability in hava_post.php in Havalite CMS 1.1.0 and earlier allows remote attackers to execute arbitr
Unrestricted file upload vulnerability in hava_upload.php in Havalite CMS 1.1.0 and earlier allows remote attackers to e
Cross-site request forgery (CSRF) vulnerability in Ilch CMS allows remote attackers to hijack the authentication of admi
Multiple cross-site scripting (XSS) vulnerabilities in Havalite 1.0.4 and earlier allow remote attackers to inject arbit
EUVD-2026-56103
GHSA-2p2v-3mjg-gfpf
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB