Advisory

GHSA-7hxc-f267-h5q7

Also known as: CVE-2026-72783

Summary

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

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.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2026-08-06 21:36 UTC
Modified
2026-09-01 21:30 UTC

Affected packages and fixes

craftcms/cms

Packagist · All systems

Affected

  • introduced 5.0.0-RC1, fixed 5.10.6 (ecosystem)

Fixed versions

5.10.6

Fix

The export has no generic command for this ecosystem.

craftcms/cms

Packagist · All systems

Affected

  • introduced 4.0.0-RC1, fixed 4.18.2 (ecosystem)

Fixed versions

4.18.2

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences