CVE-2026-107844: Contao: Path traversal in the images controller
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.
Published Oct 9, 2026
Affected packages
contao/core-bundle
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.1.0, < 5.3.50
- Fixed in
- 5.3.50
- Check
composer show contao/core-bundle
contao/core-bundle
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.4.0-RC1, < 5.7.12
- Fixed in
- 5.7.12
- Check
composer show contao/core-bundle
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 arbitrary file read. Both Apache with the shipped public/.htaccess and nginx with the documented configuration are affected.
Impact
Any unauthenticated visitor can read files that are deliberately kept outside the document root, anywhere under the project directory, as long as the name ends in one of contao.image.valid_extensions (jpg, jpeg, gif, png, tif, tiff, bmp, svg, svgz, webp). The route also acts as an existence oracle for arbitrary paths, and on a debug enabled instance the 404 message discloses the absolute filesystem path.
Honesty caveat, stated because it lowers the severity. The reporter could not use this to read protected member folders: every path below the upload directory returns 500 for the reason given under Details, so the practically reachable set is image typed files outside files/.
Credited to HDWSec.
References
- https://github.com/contao/contao/security/advisories/GHSA-mrvp-7wmx-5m4h
- https://github.com/contao/contao/commit/867c055122fdf12220f973f862082037b695b9bd
- https://github.com/contao/contao/releases/tag/5.3.50
- https://github.com/contao/contao/releases/tag/5.7.12
- https://github.com/advisories/GHSA-mrvp-7wmx-5m4h
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) entriesCVE-2026-104882
contao/core-bundle: Improper access control in the CSV import wizard
medium6.5Nov 20, 2026CVE-2026-104883
contao/core-bundle: Non-admin users can self-grant permissions that implicitly make them administrators
high7.2Nov 20, 2026CVE-2026-104884
contao/core-bundle: Cross-site scripting in the frontend search results
medium5.4Nov 20, 2026CVE-2026-107842
Contao: Protected page content is disclosed to anonymous visitors after contao.search.index_protected is disabled
medium5.3Oct 9, 2026CVE-2026-107843
Contao: The registration module re-sends activation mails
medium5.3Oct 9, 2026CVE-2026-107848
Contao: Cross-site request forgery in custom backend actions
low3.5Oct 9, 2026
