LowGHSA-7hxc-f267-h5q7CVE-2026-72783

Craft CMS: Incorrect path validation could potentially lead to path traversal

Published 6 Aug 2026 · Updated 1 Sept 2026

Affected packages

craftcms/cmsComposer
Affected
>=5.0.0-RC1 <5.10.6
Fixed in
5.10.6
Update to the fixed version for your release line, for example:composer require craftcms/cms:^5.10.6
craftcms/cmsComposer
Affected
>=4.0.0-RC1 <4.18.2
Fixed in
4.18.2
Update to the fixed version for your release line, for example:composer require craftcms/cms:^4.18.2

Details

The ensurePathIsContained function of the Local file system class is theoretically vulnerable to path traversal, although no exploitable scenario has been discovered.

When a file is read, an Asset object uses the getFileStream method of the Volume where the asset file is stored, which in turn uses the getFileStream method of the file system class used by that Volume. For the Local file system, this function returns a stream to a file on the local disk after verifying and creating the correct file path.

The file path is constructed by first validating the path and then adding a prefix to the validated and normalized path. The prefix is the path to the local directory that houses the particular volume. The order of operations matters here: first, a validation step, afterward a normalization step, and finally the construction of the resulting file path. This opens the possibility of a desanitization-style vulnerability, where the normalization invalidates the assumptions made by the validation or sanitization that preceded it.

Impact

The issue is not directly exploitable, but for hardening, a fix is recommended regardless.

Is GHSA-7hxc-f267-h5q7 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected craftcms/cms, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.