CVE-2026-32262

Craft CMS has a Path Traversal Vulnerability in AssetsController

Published Mar 16, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
Craft CMS is a content management system (CMS). From version 4.0.0-RC1 to before version 4.17.5 and from version 5.0.0-RC1 to before version 5.9.11, 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. This issue has been patched in versions 4.17.5 and 5.9.11.

Analysis

AI-generated

Technical impact

Craft CMS's AssetsController->replaceFile() method permits authenticated users with replaceFiles permission to delete arbitrary files within the same filesystem root by injecting .. path traversal sequences into the targetFilename. The issue arises because the filename is used unsanitized in a deleteFile() call before the value is sanitized by Assets::prepareAssetName(), allowing deletion of any file under the shared root and thereby compromising the integrity of the site’s content stored on local filesystems.

Affected Systems

Craft CMS versions 4.0.0-RC1 through 4.17.4 and 5.0.0-RC1 through 5.9.10 are vulnerable. The vulnerability was addressed in version 4.17.5 and version 5.9.11.

Risk and Exploitability

The CVSS score for this vulnerability is 5.3, indicating moderate severity. EPSS is below 1% and the flaw is not listed in the CISA KEV catalog, suggesting a low exploitation probability. Exploitation requires an authenticated user with replaceFiles permission and is limited to local filesystem volumes, resulting in the potential removal of critical assets and undermining content integrity.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the official security patch to upgrade to Craft CMS 4.17.5 or newer, or 5.9.11 or newer.
  • Verify that the asset replacement functionality no longer deletes files outside the intended directories.
  • Review and restrict replaceFiles permission to trusted accounts.

Generated by OpenCVE AI on March 17, 2026 at 19:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-472v-j2g4-g9h2 Craft CMS has a Path Traversal Vulnerability in AssetsController
History
Type Values Removed Values Added
First Time appeared Craftcms craft Cms
CPEs cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:-:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:rc1:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:rc2:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:rc3:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:5.0.0:-:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:5.0.0:rc1:*:*:*:*:*:*
Vendors & Products Craftcms craft Cms
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Craftcms
Craftcms craftcms
Vendors & Products Craftcms
Craftcms craftcms
Type Values Removed Values Added
Description Craft CMS is a content management system (CMS). From version 4.0.0-RC1 to before version 4.17.5 and from version 5.0.0-RC1 to before version 5.9.11, 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. This issue has been patched in versions 4.17.5 and 5.9.11.
Title Craft CMS has a Path Traversal Vulnerability in AssetsController
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 5.3, 'vector': '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'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 17, 2026, 3:22 PM
Reserved
Mar 11, 2026, 3:05 PM
Status
Analyzed
Published
Mar 16, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:35 AM