Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. craftcms/cms
  4. ›
  5. CVE-2024-52291

CVE-2024-52291: Local File System Validation Bypass Leading to File Overwrite, Sensitive File Access, and Potential Code Execution

November 13, 2024

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

References

  • github.com/advisories/GHSA-jrh5-vhr9-qh7q
  • github.com/craftcms/cms
  • github.com/craftcms/cms/security/advisories/GHSA-jrh5-vhr9-qh7q
  • nvd.nist.gov/vuln/detail/CVE-2024-52291

Code Behaviors & Features

Detect and mitigate CVE-2024-52291 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.0-RC1 before 4.12.5, all versions starting from 5.0.0-RC1 before 5.4.6

Fixed versions

  • 5.4.6
  • 4.12.5

Solution

Upgrade to versions 4.12.5, 5.4.6 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

packagist/craftcms/cms/CVE-2024-52291.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:11 +0000.