Craft CMS: Incorrect path validation could potentially lead to path traversal
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | craftcms/cms | >= 5.0.0-RC1, < 5.10.6, >= 4.0.0-RC1, < 4.18.2 | 5.10.6, 4.18.2 |
References
- https://github.com/craftcms/cms/security/advisories/GHSA-7hxc-f267-h5q7
- https://nvd.nist.gov/vuln/detail/CVE-2026-72783
- https://github.com/craftcms/cms/commit/a8425b6c707335e42c35ee2aaf03af50ea4a494d
- https://github.com/craftcms/cms/commit/bd6b9c175b4892e042e8a03760c39b0e94c4c7d6
- https://github.com/craftcms/cms
- https://github.com/craftcms/cms/releases/tag/4.18.2
- https://github.com/craftcms/cms/releases/tag/5.10.6
- https://www.vulncheck.com/advisories/craft-cms-rc1-before-path-traversal-via-ensurepathiscontained
- CVSS vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N- Weakness (CWE)
CWE-22- Platform
- Composer
- Package
craftcms/cms- Disclosed
- 06.08.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-7hxc-f267-h5q7 - CC BY 4.0
Vulnerability history: craftcms/cms
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 127
- First → latest
- 07.2021 08.2026
- Without a fix
- 6
- Exploited in attacks
- 4
Severity breakdown
- Critical 9
- High 41
- Medium 65
- Low 12
Disclosures per year
- 2021: 3
- 2022: 22
- 2023: 13
- 2024: 9
- 2025: 6
- 2026: 74
-
Craft CMS: Incorrect path validation could potentially lead to path traversal this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.