CVE-2026-32262: Craftcms/cms Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-472v-j2g4-g9h2
CWE-22
Published
Advisory Summary

CVE-2026-32262 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Craftcms/cms libraries in the Packagist ecosystem. The issue involves craft cms has a path traversal vulnerability in assetscontroller. Remediation is available by upgrading affected packages to version 4.17.5, 5.9.11.

CVE-2026-32262 at a Glance

CVE Identifier CVE-2026-32262
GHSA Identifier GHSA-472v-j2g4-g9h2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Craftcms/cms
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-32262

To remediate this vulnerability, upgrade all affected Craftcms/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

craftcms/cms fixed: 4.17.5
Upgrade craftcms/cms to 4.17.5
craftcms/cms fixed: 5.9.11
Upgrade craftcms/cms to 5.9.11
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-32262, inspect your project dependencies for Craftcms/cms:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Craftcms/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.17.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Craftcms/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The `AssetsController->replaceFile()` method has a `targetFilename` body parameter that is used unsanitized in a `deleteFile()` call before `Assets::prepareAssetName()` is applied on save. This allows an authenticated user with `replaceFiles` permission to delete arbitrary files within the same filesystem root by injecting `../` path traversal sequences into the filename. This could allow an authenticated user with `replaceFiles` permission on one volume to delete files in other folders/volumes that share the same filesystem root. This only affects local filesystems. Users should update to Craft 4.17.5 or 5.9.11 to mitigate the issue.

CVE-2026-32262 Affected Craftcms/cms Versions

2 component(s)
Fixed Versions:
4.17.55.9.11
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 4.0.0-RC1
< 4.17.5
4.17.5
craftcms/cms
Packagist
≥ 5.0.0-RC1
< 5.9.11
5.9.11

References

Frequently Asked Questions

What is CVE-2026-32262?
CVE-2026-32262 is a security vulnerability in Craftcms/cms involving Craft CMS has a Path Traversal Vulnerability in AssetsController under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Craftcms/cms versions are affected?
Affected versions include releases prior to 4.17.5, 5.9.11 across affected packages: craftcms/cms.
What version fixes CVE-2026-32262?
Upgrading to 4.17.5, 5.9.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 4.17.5, 5.9.11. Upgrade your dependency to 4.17.5, 5.9.11 or later.
What CWE is associated with CVE-2026-32262?
CVE-2026-32262 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2026-32262?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-472v-j2g4-g9h2",
  "modified" : "2026-03-16T21:57:24Z",
  "published" : "2026-03-16T18:11:49Z",
  "aliases" : [ "CVE-2026-32262" ],
  "summary" : "Craft CMS has a Path Traversal Vulnerability in AssetsController",
  "details" : "The `AssetsController->replaceFile()` method has a `targetFilename` body parameter that is used unsanitized in a `deleteFile()` call before `Assets::prepareAssetName()` is applied on save. This allows an authenticated user with `replaceFiles` permission to delete arbitrary files within the same filesystem root by injecting `../` path traversal sequences into the filename.\n\nThis could allow an authenticated user with `replaceFiles` permission on one volume to delete files in other folders/volumes that share the same filesystem root.\n\nThis only affects local filesystems.\n\nUsers should update to Craft 4.17.5 or 5.9.11 to mitigate the issue.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-RC1"
      }, {
        "fixed" : "4.17.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.17.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-RC1"
      }, {
        "fixed" : "5.9.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.9.10"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/security/advisories/GHSA-472v-j2g4-g9h2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32262"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/commit/c997efbe4c66c14092714233aeebff15cdbfcf11"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-16T18:11:49Z",
    "nvd_published_at" : "2026-03-16T20:16:19Z"
  }
}