CVE-2026-107844: Contao: Path traversal in the images controller

Published Oct 9, 2026
·
Updated

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.validextensions, 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.validextensions (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/.

Other sources

Contao is an Open Source CMS. From version 5.0.0 until 5.3.50 and 5.7.12, ImagesController joins the user-controlled {path} parameter to the configured image target directory with Path::join() but does not use Path::isBasePath() to verify that the canonical path remains inside that directory. An unauthenticated request containing encoded parent-directory segments can therefore return files under the project directory through BinaryFileResponse when their names use an extension allowed by contao.image.validextensions. The route can also reveal whether arbitrary paths exist, and debug responses can disclose absolute filesystem paths, but paths below the upload directory were not shown to be readable. This issue is fixed in versions 5.3.50 and 5.7.12.

— MITRE

Affected Software

3 affected componentsFixes available
Contao Contao>=5.0.0<5.3.50, >=5.4.0<5.7.12
composer/contao/core-bundle>=5.4.0-RC1<5.7.12
5.7.12
composer/contao/core-bundle>=4.1.0<5.3.50
5.3.50

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/contao/core-bundle to a version that resolves this vulnerability.

    Fixed in 5.7.12
  2. Upgrade

    Upgrade composer/contao/core-bundle to a version that resolves this vulnerability.

    Fixed in 5.3.50
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.3.50
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.7.12

Event History

Oct 9, 2026
CVE Published
via MITRE·07:24 PM
Data Sourced
via MITRE·07:24 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:53 PM
Data Sourced
via GitHub·08:53 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

Contao deployments from 5.0.0 before 5.3.50, and versions before 5.7.12 in the 5.7 line, are affected. Exposure depends on the image controller being reachable and on files under the project directory having extensions permitted by contao.image.valid_extensions.

2

What does an attacker need to exploit this?

No authentication, privileges, or user interaction are required. An attacker can send a request with encoded parent-directory segments in the image path parameter.

3

What information can be disclosed?

The issue can return project-directory files through the image controller when their extensions are allowed by contao.image.valid_extensions. It can also be used to determine whether arbitrary paths exist, and debug responses may reveal absolute filesystem paths; reading paths below the upload directory was not demonstrated.

4

What should be done if an immediate upgrade is not possible?

Restrict access to the affected image-controller route where feasible and review contao.image.valid_extensions to minimize the file types that can be returned. Disable debug responses in production to avoid disclosure of absolute filesystem paths.

5

How can I remediate the issue?

Upgrade to Contao 5.3.50 or 5.7.12, which contain the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203