What’s Vulnerable › Vulnerabilities
CVE-2024-52291: Craft has a Local File System Validation Bypass Leading to File Overwrite, Sensitive File Access, and Potential Code Execution
- Severity: high (CVSS 7.2 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-11-13 · updated 2026-06-17
- Weakness: CWE-22
Description
Craft is a content management system (CMS). A vulnerability in CraftCMS allows an attacker to bypass local file system validation by utilizing a double file:// scheme (e.g., file://file:////). This enables the attacker to specify sensitive folders as the file system, leading to potential file overwriting through malicious uploads, unauthorized access to sensitive files, and, under certain conditions, remote code execution (RCE) via Server-Side Template Injection (SSTI) payloads. Note that this will only work if you have an authenticated administrator account with allowAdminChanges enabled. This is fixed in 5.4.6 and 4.12.5.
Affected products
- craftcms cms: from 4.0.0 (excl.) before 4.12.5; from 5.0.0 (excl.) before 5.4.6; 4.0.0-rc1, 4.0.0-rc2, 4.0.0-rc3, 5.0.0-rc1 — fixed in 4.12.5, 5.4.6
How to fix
Upgrade to a fixed version: craftcms cms 4.12.5, 5.4.6. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2024-52291 or the next vulnerability affects your stack