Oct 10, 2026·5 min read·26 visits
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.
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.
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.
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().
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.
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 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-dependenciesFor 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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Contao CMS Contao | >= 5.0.0, < 5.3.50 | 5.3.50 |
Contao CMS Contao | >= 5.4.0-RC1, < 5.7.12 | 5.7.12 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) |
| CVSS v3.1 Score | 5.3 (Medium) |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| Attack Vector | Network (Unauthenticated HTTP/HTTPS GET requests) |
| EPSS Score | 0.00312 (22.18th percentile) |
| Impact | Partial Information Disclosure / Local File Enumeration |
| Exploit Status | Proof of Concept / Public Commit Diffs Available |
| CISA KEV Status | Not Listed |
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.
WWBN AVideo versions through 29.0 contain an OS command injection vulnerability (CWE-78) in the standalone API utility function listFFmpegProcesses(). The function constructs a shell pipeline to monitor active FFmpeg processes by interpolating a user-controlled keyword parameter directly into a single-quoted grep argument without sanitization or shell escaping. An attacker capable of crafting or submitting a valid encrypted codeToExec payload can break out of the single-quoted argument context and execute arbitrary operating system commands with the privileges of the web server user.
Ruflo versions prior to 3.16.3 expose the Model Context Protocol (MCP) bridge HTTP endpoints (`POST /mcp` and `POST /mcp/:group`) on all network interfaces (`0.0.0.0:3001`) without authentication. Because the primary JSON-RPC tool dispatcher (`executeTool()`) bypasses existing tool blocklists, an unauthenticated network attacker can invoke the `terminal_execute` tool to achieve arbitrary command execution inside the bridge container. This initial access permits full exfiltration of third-party LLM provider API keys, unauthorized access to the co-located MongoDB instance, and manipulation of the AgentDB learning store.
In etcd versions prior to 3.5.32 and 3.6.13, configuring the server with --listen-client-http-urls decouples HTTP and gRPC traffic onto distinct network listeners. Due to an implementation flaw in how TLS configurations are passed to the gRPC server instance, the Certificate Revocation List (CRL) defined by --client-crl-file is enforced exclusively on the HTTP listener and omitted entirely on the dedicated gRPC listener. This allows an adversary possessing a revoked, CA-signed client certificate to bypass mutual TLS (mTLS) revocation checks and authenticate directly to the gRPC interface.
GitHub CLI (gh) versions 2.10.0 through 2.95.0 contain an input validation vulnerability in the `gh codespace jupyter` command path. When connecting to a remote Codespace to launch a JupyterLab session, the CLI retrieves a server URL via a remote procedure call (RPC) and passes it directly to the host operating system's default URL dispatcher without validating the scheme or target host. A compromised or malicious Codespace can return a custom protocol URI, such as `vscode://` or `vscode-insiders://`, allowing an attacker to invoke local desktop application handlers and achieve arbitrary command execution on the developer's workstation.
A path traversal vulnerability exists in the cakephp/twig-view plugin for the CakePHP framework prior to versions 1.3.3 and 2.1.2. The Cake\TwigView\Twig\FileLoader::findTemplate() method verifies template existence using PHP's native file_exists() function without ensuring the target path resides within configured application or plugin template directories. When user-controlled input is passed to template inclusion mechanisms, an unauthenticated remote attacker can read arbitrary local files accessible to the PHP runtime.
CVE-2026-64855 (GHSA-859w-52fx-hcm6) is a cryptographic signature verification and authentication bypass vulnerability in the soapbar Python library prior to version 0.13.0. In vulnerable versions, the verify_envelope_bsp() function derives its trust anchor directly from the incoming SOAP message by extracting an untrusted X.509 certificate embedded inside the wsse:BinarySecurityToken header. Because the function checks only the temporal validity of the extracted certificate without performing Certificate Authority (CA) chain validation or certificate pinning, an unauthenticated network attacker can generate a self-signed certificate, sign an arbitrary SOAP payload, and pass verification.