7.0high
Trivy: Path traversal via a crafted vulnerability database or other downloaded artifacts
- Severity
- 7.0high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.44% (higher than 30% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mcj4-mphf-j9ffGO-2026-6294
Description
Trivy is a security scanner. Prior to 0.71.1, when Trivy downloads an OCI artifact, it uses the org.opencontainers.image.title annotation from the artifact manifest as the destination filename without validation. An attacker who can make Trivy fetch an attacker-controlled artifact can supply a crafted annotation that resolves to a path outside the intended destination, causing Trivy to write the layer content to an arbitrary location on the host filesystem. This vulnerability is fixed in 0.71.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| aquasecurity trivy | < 0.71.1 | CVE List |
| github.com/aquasecurity/trivy (Go) | before 0.71.1 | GitHub Advisory Database, Go Vulnerability Database |
| aquasec trivy | before 0.71.1 | NVD |
All scores
| GitHub_M | 7.0high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Trivy is a security scanner. Prior to 0.71.1, when Trivy downloads an OCI artifact, it uses the org.opencontainers.image.title annotation from the artifact manifest as the destination filename without validation. An attacker who can make Trivy fetch an attacker-controlled artifact can supply a crafted annotation that resolves to a path outside the intended destination, causing Trivy to write the layer content to an arbitrary location on the host filesystem. This vulnerability is fixed in 0.71.1.
GitHub Advisory Database
Summary
When Trivy downloads an OCI artifact, it uses the org.opencontainers.image.title annotation from the artifact manifest as the destination filename without validation. An attacker who can make Trivy fetch an attacker-controlled artifact can supply a crafted annotation that resolves to a path outside the intended destination, causing Trivy to write the layer content to an arbitrary location on the host filesystem.
Affected configurations
Exploitation requires the attacker to direct Trivy at an attacker-controlled OCI artifact via one of the following inputs:
| Input | Used for |
|---|---|
--db-repository flag, TRIVY_DB_REPOSITORY environment variable, or db.repository in trivy.yaml | Vulnerability database |
--java-db-repository flag, TRIVY_JAVA_DB_REPOSITORY environment variable, or db.java-repository in trivy.yaml | Java vulnerability database |
--checks-bundle-repository flag (and the deprecated --policy-bundle-repository alias), TRIVY_CHECKS_BUNDLE_REPOSITORY environment variable, or misconfiguration.checks-bundle-repository in trivy.yaml | Misconfiguration checks bundle |
Repository argument to trivy module install <REPO> | WASM module installation |
Realistic scenarios in which an attacker may influence these inputs include a copy-pasted command or documentation snippet pointing to an untrusted mirror, or a third-party mirror that turns out to be hostile.
Trivy's default configuration, which downloads these artifacts from Aqua-operated repositories, is not affected. The risk applies only when one of the inputs above is overridden to download a different artifact.
Impact
An attacker who satisfies the conditions above can overwrite or create arbitrary files on the host filesystem within the privilege boundary of the user running Trivy. The vulnerability does not grant any privileges beyond what that user already has.
The practical impact depends on the deployment. In environments where the running user can overwrite files such as SSH authorized_keys, shell startup files, cron entries, or binaries on PATH, the file write may be leveraged to achieve code execution as that user. In more restricted deployments, the impact is bounded to the user's writable scope but may still allow tampering with scan results, build artifacts, or other files consumed by subsequent steps in the same pipeline.
Patches
Fixed in Trivy 0.71.1. Users should upgrade to that release or later.
Workarounds
If upgrading is not immediately possible, do not download Trivy artifacts (vulnerability database, Java database, misconfiguration checks bundle, modules, etc.) from OCI repositories you do not operate or trust.
Credits
Reported by @ikkebr.
Go Vulnerability Database
Path traversal via crafted vulnerability database or other downloaded artifacts in github.com/aquasecurity/trivy
NVD (es)
Trivy es un escáner de seguridad. Antes de 0.71.1, cuando Trivy descarga un artefacto OCI, utiliza la anotación org.opencontainers.image.title del manifiesto del artefacto como nombre de archivo de destino sin validación. Un atacante que puede hacer que Trivy obtenga un artefacto controlado por el atacante puede proporcionar una anotación manipulada que se resuelve en una ruta fuera del destino previsto, haciendo que Trivy escriba el contenido de la capa en una ubicación arbitraria en el sistema de archivos del host. Esta vulnerabilidad se corrigió en 0.71.1.
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-55092 changed 2026-06-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mcj4-mphf-j9ff changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6294 changed 2026-08-28 | CC-BY-4.0 |
| NVD | CVE-2026-55092 changed 2026-10-25 | Public domain |