MediumGHSA-mrvp-7wmx-5m4h
Contao: Path traversal in the images controller
Affected versions
4.1.0 to before 5.3.50, 5.4.0-RC1 to before 5.7.12 - fixed in 5.3.50Details
`ImagesController` joins the user controlled `{path}` onto the configured image target directory with `Path::join()`, which canonicalises `..` segments, and never calls `Path::isBasePath()` to confirm the result stayed inside that directory. An unauthenticated GET with percent encoded dot segments therefore escapes the directory and the file is returned by `BinaryFileResponse`. Reads are bounded to the extensions in `contao.image.valid_extensions`, and paths below the upload directory fail for an unrelated reason, so this is reported as a missing boundary check rather than as a general arbitra
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-107844
- https://github.com/contao/contao/security/advisories/GHSA-mrvp-7wmx-5m4h
- https://github.com/contao/contao/commit/867c055122fdf12220f973f862082037b695b9bd
- https://github.com/contao/contao
- https://github.com/contao/contao/releases/tag/5.3.50
- https://github.com/contao/contao/releases/tag/5.7.12
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected