Executive brief
Trivy is a vulnerability scanner that supports third-party plugins. The plugin manager fails to validate plugin metadata, allowing a malicious plugin to write files to any location on the system that the user running Trivy can access. An attacker must trick a user into installing the malicious plugin first. This could result in unauthorized modification of system files or data, but does not escalate the attacker's privileges beyond what the installing user already has.
Technical details
The vulnerability is a path traversal flaw (CWE-22) in Trivy's plugin installation mechanism. The plugin manager constructs filesystem paths under the plugin root (~/.trivy/plugins) using unsanitized metadata from a plugin's manifest file. By crafting a manifest with path traversal sequences (e.g., using ../ components), an attacker can cause Trivy to write the plugin binary and manifest files outside the intended plugin directory. The attack requires user interaction—the user must install the malicious plugin via `trivy plugin install <SOURCE>` or `trivy plugin run <SOURCE>`—but does not require elevated privileges. Plugins from the official Trivy plugin index are unaffected. The vulnerability was patched in version 0.72.0.
Affected products
- Aqua Security Trivy < 0.72.0
Timeline
- 2026-06-30: disclosed: Published to GitHub Advisory Database
- 2026-07-30: patched: Fixed in Trivy 0.72.0
- 2026-08-18: advisory: GitHub Advisory GHSA-8rc5-4fr6-64pw published