CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-107844

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 10, 2026·5 min read·26 visits

Executive Summary (TL;DR)

Unauthenticated path traversal in Contao ImagesController permits arbitrary reading of localized files matching allowed extensions and system directory probing.

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Vulnerability Overview

A path traversal vulnerability exists within the dynamic image processing sub-system of Contao CMS. The flaw is located in the ImagesController component (core-bundle/src/Controller/ImagesController.php), which processes image resizing and serving requests derived from URL parameters.

When a request targets an image asset, ImagesController resolves the user-supplied {path} route parameter against a designated image target directory. Because the component fails to enforce directory boundary checks on the resolved path, relative directory traversal sequences allow the canonical path to reference locations higher up in the application filesystem hierarchy.

This vulnerability is accessible to unauthenticated remote attackers over HTTP or HTTPS endpoints handling image transformations. Although file retrieval is limited to file extensions allowed by the system configuration, an attacker can enumerate local files, verify filesystem structures, or trigger verbose debug errors that reveal absolute filesystem paths.

Root Cause Analysis

The underlying security weakness stems from an inadequate validation step prior to instantiating image processing objects. In affected Contao releases, ImagesController utilizes the Symfony Path::join() utility to combine the base target directory ($this->targetDir) with the client-provided path parameter ($path).

While Path::join() normalizes dot segments such as . and .., it does not restrict the canonicalized output path to the base directory prefix. As a result, if $path contains parent directory traversals like ../.., Path::join() produces an absolute path outside the intended target directory scope.

Because the controller previously passed this path directly into $this->imageFactory->create(), the system attempted to access and process the target file without validating ownership or location relative to $this->targetDir. The missing safeguard is the invocation of Path::isBasePath($this->targetDir, $path), which verifies that the resolved path resides strictly within the target base path.

Code Analysis

Analysis of the vulnerable implementation in core-bundle/src/Controller/ImagesController.php shows that the path parameter was joined inline during factory creation:

// Vulnerable code in core-bundle/src/Controller/ImagesController.php
public function __invoke(string $path): Response
{
    try {
        try {
            // Path::join resolves '..' but does not restrict output to $this->targetDir
            $image = $this->imageFactory->create(Path::join($this->targetDir, $path));
        } catch (\InvalidArgumentException $exception) {
            throw new NotFoundHttpException($exception->getMessage(), $exception);
        }

The security patch introduced in commit 867c055122fdf12220f973f862082037b695b9bd resolves the target path prior to processing and enforces explicit boundary checking via Path::isBasePath():

// Patched code in core-bundle/src/Controller/ImagesController.php
public function __invoke(string $path): Response
{
    // Step 1: Pre-join and normalize the path
    $path = Path::join($this->targetDir, $path);
 
    // Step 2: Validate that the resolved path stays within $this->targetDir
    if (!Path::isBasePath($this->targetDir, $path)) {
        throw new NotFoundHttpException('Image does not exist');
    }
 
    try {
        try {
            // Step 3: Pass normalized, validated path to the image factory
            $image = $this->imageFactory->create($path);
        } catch (\InvalidArgumentException $exception) {
            throw new NotFoundHttpException($exception->getMessage(), $exception);
        }

Unit tests were added in core-bundle/tests/Controller/ImagesControllerTest.php to confirm that passing ../dummy.jpg triggers a NotFoundHttpException without invoking ImageFactoryInterface::create().

Exploitation Methodology

An attack against CVE-2026-107844 involves sending a crafted HTTP GET request to routes managed by ImagesController. Prerequisites for exploitation include network access to the application endpoints and knowledge of target paths relative to the image storage location.

An attacker supplies path traversal payloads embedded in the route parameter, such as /assets/images/../../system/config/config.png. If the requested file exists and its extension matches allowed entries in contao.image.valid_extensions, the controller processes the file and returns it inside a Symfony BinaryFileResponse object.

If the target file extension is not permitted, the system returns an error response; however, distinct response codes and execution timings allow attackers to differentiate between existing files, missing files, and unpermitted file formats. In environments where application debug features are active, detailed error stacks return absolute system filesystem paths.

Security Impact & Threat Assessment

The CVSS v3.1 base score for CVE-2026-107844 is evaluated at 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N). The vulnerability exhibits high exploitability due to its unauthenticated remote nature and low attack complexity.

Impact is constrained primarily to Confidentiality (C:L). An attacker cannot modify files (I:N) or trigger denial of service conditions directly (A:N). Furthermore, scope remains unchanged (S:U) because traversal cannot breach host kernel boundaries or container isolates beyond web server process permissions.

Threat classification aligns with MITRE ATT&CK techniques T1083 (File and Directory Discovery) and T1005 (Data from Local System). While EPSS metrics place likelihood of automated exploitation at a low baseline, exposure risks remain elevated for deployments disclosing debug information.

Remediation & Patch Verification

Remediation requires updating the contao/contao dependency to a patched version. Environments running Contao 5.3.x must update to 5.3.50 or higher, and environments running Contao 5.7.x must update to 5.7.12 or higher.

Execute the following Composer command in the project root directory to retrieve updated package dependencies:

composer update contao/contao --with-dependencies

For environments where immediate maintenance updates cannot be performed, Web Application Firewall (WAF) filtering rules should be deployed to detect and block URL-encoded traversal sequences such as %2e%2e%2f, %2e%2e/, and ..%2f within target image routing URIs.

Official Patches

ContaoContao Maintenance Release 5.3.50
ContaoContao Maintenance Release 5.7.12

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS Probability
0.31%
Top 78% most exploited
15,000
via Censys & Shodan Contao CMS Fingerprints

Affected Systems

Contao CMS 5.0.0 through 5.3.49Contao CMS 5.4.0-RC1 through 5.7.11

Affected Versions Detail

Product
Affected Versions
Fixed Version
Contao CMS
Contao
>= 5.0.0, < 5.3.505.3.50
Contao CMS
Contao
>= 5.4.0-RC1, < 5.7.125.7.12
AttributeDetail
CWE IDCWE-22 (Improper Limitation of a Pathname to a Restricted Directory)
CVSS v3.1 Score5.3 (Medium)
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack VectorNetwork (Unauthenticated HTTP/HTTPS GET requests)
EPSS Score0.00312 (22.18th percentile)
ImpactPartial Information Disclosure / Local File Enumeration
Exploit StatusProof of Concept / Public Commit Diffs Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be restricted to a directory within a restricted parent directory, but does not properly neutralize special elements such as '..' sequences.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory details and test suite PoC demonstrating path traversal via ImagesController.

Vulnerability Timeline

Vendor patch committed by Contao core maintainers.
2026-08-25
GitHub Advisory GHSA-mrvp-7wmx-5m4h and CVE-2026-107844 published.
2026-10-09

References & Sources

  • [1]Contao Security Advisory GHSA-mrvp-7wmx-5m4h
  • [2]Contao Security Fix Commit 867c055122fdf12220f973f862082037b695b9bd
  • [3]Contao Release Notes 5.3.50
  • [4]Contao Release Notes 5.7.12
  • [5]NVD Vulnerability Detail CVE-2026-107844
  • [6]CVE Program Record CVE-2026-107844

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•26 minutes ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
1 views•12 min read
•about 1 hour ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 2 hours ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 3 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
7 views•10 min read
•about 7 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 8 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
6 views•9 min read