CVE-2026-32262
PHP vulnerability analysis and mitigation

Overview

CVE-2026-32262 is a path traversal vulnerability in the AssetsController->replaceFile() method of Craft CMS, classified as Moderate severity. It affects Craft CMS versions 4.0.0-RC1 through 4.17.4 and 5.0.0-RC1 through 5.9.10 on local filesystem deployments. The vulnerability was published on March 16, 2026, by the Craft CMS security team via GitHub Advisory GHSA-472v-j2g4-g9h2. It carries a CVSS v3.1 base score of 4.3 (Medium) and a CVSS v4.0 base score of 5.3 (Medium) (GitHub Advisory, Craft CMS Advisory).

Technical details

The root cause is improper input validation (CWE-22 — Path Traversal) in the AssetsController->replaceFile() method, where the targetFilename body parameter is passed unsanitized to a deleteFile() call before Assets::prepareAssetName() sanitization is applied. An authenticated attacker with replaceFiles permission can inject ../ sequences into the targetFilename parameter to traverse outside the intended directory and delete arbitrary files within the same filesystem root. The fix, applied in commit c997efb, adds a check that throws a BadRequestHttpException if the targetFilename contains / or \ characters, preventing path traversal. This vulnerability is limited to local filesystem volumes and does not affect remote or cloud-based storage (Craft CMS Advisory, Patch Commit).

Impact

Successful exploitation allows an authenticated attacker with replaceFiles permission on one volume to delete arbitrary files in other folders or volumes that share the same local filesystem root. This can result in data loss, deletion of critical application or configuration files, and potential system instability. There is no confidentiality or integrity impact on data content — the vulnerability is limited to unauthorized file deletion (availability impact). Lateral movement across volumes is possible if multiple volumes share the same filesystem root (GitHub Advisory).

Exploitability

There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (GitHub Advisory). The EPSS score is approximately 0.037% (12th percentile), indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires valid authentication credentials and the replaceFiles permission, which limits the attacker pool to trusted or compromised internal users.

Exploitation steps

  1. Reconnaissance: Identify a Craft CMS instance running a vulnerable version (4.0.0-RC1–4.17.4 or 5.0.0-RC1–5.9.10) with local filesystem volumes configured.
  2. Obtain credentials: Acquire or compromise an account with replaceFiles permission on at least one asset volume.
  3. Identify target file: Determine the relative path from the attacker-accessible volume to a target file in another folder or volume sharing the same filesystem root (e.g., a configuration file or application asset).
  4. Craft malicious request: Send an authenticated HTTP POST request to the replaceFile action endpoint, setting the targetFilename body parameter to a path traversal payload such as ../../other-volume/important-file.php.
  5. Trigger file deletion: The unsanitized targetFilename is passed to deleteFile() before sanitization, causing the server to delete the targeted file outside the permitted directory.
  6. Achieve objective: The target file is deleted, potentially causing application errors, data loss, or disruption of service depending on the criticality of the deleted file (Craft CMS Advisory, Patch Commit).

Indicators of compromise

  • Network: Authenticated HTTP POST requests to the Craft CMS replaceFile action endpoint containing targetFilename values with ../ or ..\ sequences in the request body.
  • Logs: Craft CMS application logs showing file deletion events for files outside the expected asset volume directory; unexpected BadRequestHttpException errors on patched systems indicating attempted exploitation.
  • File System: Missing files in asset directories or adjacent directories that were not intentionally deleted; unexpected gaps in asset volume contents, particularly configuration or PHP files.
  • Process: Unexpected file system changes (deletions) in directories outside configured asset volumes, detectable via file integrity monitoring tools (Craft CMS Advisory).

Mitigation and workarounds

Update Craft CMS to version 4.17.5 (for the 4.x branch) or 5.9.11 (for the 5.x branch), which include the fix that validates the targetFilename parameter to reject any value containing / or \ characters. As an interim measure, restrict replaceFiles permissions to only trusted users who genuinely require this functionality, and implement filesystem-level access controls to limit the blast radius of any path traversal. Consider monitoring file deletion activity on local filesystem volumes as an additional detection layer (Craft CMS Advisory, Patch Commit).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-47156CRITICAL9.3
  • PHP logoPHP
  • mantisbt/mantisbt
NoYesSep 09, 2026
CVE-2026-85400HIGH7.5
  • PHP logoPHP
  • cpe:2.3:a:typo3:typo3
NoYesSep 08, 2026
CVE-2026-53637MEDIUM6.5
  • PHP logoPHP
  • sylius/sylius
NoYesSep 08, 2026
CVE-2026-53639MEDIUM6.3
  • PHP logoPHP
  • sylius/sylius
NoYesSep 08, 2026
CVE-2026-53638MEDIUM4.3
  • PHP logoPHP
  • sylius/sylius
NoYesSep 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management