Contao: Possible path traversal in job download URIs
Summary
An authenticated backend user who can access one job can request an attachment identifier containing ../ segments and make the job attachment download endpoint read a file from another job directory inside var/job-attachments.
The controller authorizes only the jobUuid route parameter. The later attachment lookup joins that authorized job UUID with the attacker-controlled identifier, then passes the combined path to the virtual filesystem. VirtualFilesystem::resolve() canonicalizes the whole path and only rejects paths that escape the filesystem mount, so authorized-job/../victim-job/debug_log.csv becomes victim-job/debug_log.csv.
This is a cross-job authorization bypass for known job attachment paths. It is not a practical brute-force against unknown jobs because job directories are UUID v4 values.
Root Cause
JobsController::downloadJobAttachment() checks access to the route jobUuid before loading the attachment:
$job = $this->jobs->getByUuid($jobUuid);
if (!$job || !$this->jobs->hasAccess($job)) {
throw $this->createNotFoundException();
}
$attachment = $this->jobs->getAttachment($jobUuid, $identifier);
Jobs::getAttachment() then resolves a path built from the authorized job UUID and the attacker-controlled identifier:
$fileItem = $this->jobAttachmentsStorage->get($this->getAttachmentIdentifier($job, $identifier));
return $job->getUuid().'/'.$identifier;
VirtualFilesystem::resolve() canonicalizes the combined path. It rejects absolute paths and paths that start with .., but it does not preserve the authorized job directory as a boundary:
$path = Path::canonicalize($location);
if (str_starts_with($path, '..')) {
throw new \OutOfBoundsException(...);
}
return Path::join($this->prefix, $path);
Therefore:
<authorized-job>/../<victim-job>/debug_log.csv
canonicalizes to:
<victim-job>/debug_log.csv
which remains inside the job-attachments filesystem mount and is accepted.
Recommended Fix
Treat the attachment identifier as a filename, not a path:
- Reject
/,\, NUL, and dot-segment components inidentifier. - Add a route requirement that prevents slashes in
{identifier}if nested attachment paths are not intended. - After resolving, assert the canonical relative path starts with
<authorized-job-uuid>/before returning aFilesystemItem. - Apply the same identifier validation in
Jobs::addAttachment()so future producers/extensions cannot write outside the owning job directory.
Impact
A low-privileged backend user can read another job's attachment if they know or obtain the target job UUID and attachment filename. Built-in crawler jobs attach CSV logs such as debug_log.csv, broken-link-checker_log.csv, and search-index_log.csv, which can contain crawled URLs, referring URLs, tags, and error messages.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | contao/contao | >= 5.7.0, < 5.7.7 | 5.7.7 |
| Composer package | contao/core-bundle | >= 5.7.0, < 5.7.7 | 5.7.7 |
References
- https://github.com/contao/contao/security/advisories/GHSA-grm4-wm43-9jh5
- https://nvd.nist.gov/vuln/detail/CVE-2026-55825
- https://contao.org/en/security-advisories/path-traversal-in-the-jobs-module
- https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/contao/CVE-2026-55825.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/contao/core-bundle/CVE-2026-55825.yaml
- https://github.com/contao/contao
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N- Weakness (CWE)
CWE-22- Platform
- Composer
- Package
contao/contao, contao/core-bundle- Disclosed
- 06.08.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-grm4-wm43-9jh5 - CC BY 4.0
Vulnerability history: contao/contao
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 25
- First → latest
- 12.2019 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 4
- High 6
- Medium 12
- Low 3
Disclosures per year
- 2019: 3
- 2020: 1
- 2021: 4
- 2022: 9
- 2023: 1
- 2024: 0
- 2025: 4
- 2026: 3
-
Contao: Possible path traversal in job download URIs this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.