CVE-2026-72783: 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.
Published Aug 6, 2026 · Updated Sep 1, 2026
Affected packages
craftcms/cms
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0-RC1, < 5.10.6
- Fixed in
- 5.10.6
- Check
composer show craftcms/cms
craftcms/cms
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.0.0-RC1, < 4.18.2
- Fixed in
- 4.18.2
- Check
composer show craftcms/cms
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
- https://github.com/craftcms/cms/security/advisories/GHSA-7hxc-f267-h5q7
- https://github.com/craftcms/cms/commit/a8425b6c707335e42c35ee2aaf03af50ea4a494d
- https://github.com/craftcms/cms/commit/bd6b9c175b4892e042e8a03760c39b0e94c4c7d6
- https://github.com/craftcms/cms/releases/tag/4.18.2
- https://github.com/craftcms/cms/releases/tag/5.10.6
- https://nvd.nist.gov/vuln/detail/CVE-2026-72783
- https://www.vulncheck.com/advisories/craft-cms-rc1-before-path-traversal-via-ensurepathiscontained
- https://github.com/advisories/GHSA-7hxc-f267-h5q7
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesGHSA-wg23-69c2-gjc8
Craft CMS: Passkey login accepts replayed WebAuthn assertions
critical9.1Aug 7, 2026CVE-2026-14793
Craft CMS: Missing authorization check allows non-admin control panel users to reorder Global Sets
medium4.3Aug 6, 2026CVE-2026-14794
Craft CMS: Missing authorization check allows non-admin control panel users access to user registration metrics
medium4.3Aug 6, 2026CVE-2026-72778
Craft CMS: Authenticated RCE via `condition.config` JSON cleanse bypass
high8.7Aug 6, 2026CVE-2026-72779
Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts
medium6.9Aug 6, 2026CVE-2026-72781
Craft CMS: Authenticated RCE through Twig sandbox escape
high8.7Aug 6, 2026
