Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS14Y3E0LW0ycjMtY21yas4AA8WM

Trivy possibly leaks registry credential when scanning images from malicious registries

Impact

If a malicious actor is able to trigger Trivy to scan container images from a crafted malicious registry, it could result in the leakage of credentials for legitimate registries such as AWS Elastic Container Registry (ECR), Google Cloud Artifact/Container Registry, or Azure Container Registry (ACR). These tokens can then be used to push/pull images from those registries to which the identity/user running Trivy has access.

Taking AWS as an example, the leakage only occurs when Trivy is able to transparently obtain registry credentials from the default credential provider chain. You are affected if Trivy is executed in any of the following situations:

You are not affected if the default credential provider chain is unable to obtain valid credentials. The same applies to GCP and Azure.

Workarounds

If you are using Trivy v0.51.2 or later, you are not affected. If you are using Trivy v0.51.1 or prior, you should ensure you only scan images from trusted registries.

This vulnerability only applies when scanning container images directly from a registry. If you use Docker, containerd or other runtime to pull images locally and scan them with Trivy, you are not affected. To enforce this behavior, you can use the --image-src flag to select which sources you trust.

Permalink: https://github.com/advisories/GHSA-xcq4-m2r3-cmrj
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14Y3E0LW0ycjMtY21yas4AA8WM
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 6 months ago
Updated: 6 months ago


CVSS Score: 5.5
CVSS vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N

Identifiers: GHSA-xcq4-m2r3-cmrj, CVE-2024-35192
References: Repository: https://github.com/aquasecurity/trivy
Blast Radius: 11.7

Affected Packages

go:github.com/aquasecurity/trivy
Dependent packages: 153
Dependent repositories: 134
Downloads:
Affected Version Ranges: < 0.51.2
Fixed in: 0.51.2
All affected versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 0.17.2, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22.0, 0.23.0, 0.24.0, 0.24.1, 0.24.2, 0.24.3, 0.24.4, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 0.25.4, 0.26.0, 0.27.0, 0.27.1, 0.28.0, 0.28.1, 0.29.0, 0.29.1, 0.29.2, 0.30.0, 0.30.1, 0.30.2, 0.30.3, 0.30.4, 0.31.0, 0.31.1, 0.31.2, 0.31.3, 0.32.0, 0.32.1, 0.33.0, 0.34.0, 0.35.0, 0.36.0, 0.36.1, 0.37.0, 0.37.1, 0.37.2, 0.37.3, 0.38.0, 0.38.1, 0.38.2, 0.38.3, 0.39.0, 0.39.1, 0.40.0, 0.41.0, 0.42.0, 0.42.1, 0.43.0, 0.43.1, 0.44.0, 0.44.1, 0.45.0, 0.45.1, 0.46.0, 0.46.1, 0.47.0, 0.48.0, 0.48.1, 0.48.2, 0.48.3, 0.49.0, 0.49.1, 0.50.0, 0.50.1, 0.50.2, 0.50.3, 0.50.4, 0.51.0, 0.51.1
All unaffected versions: 0.51.2, 0.51.3, 0.51.4, 0.52.0, 0.52.1, 0.52.2, 0.53.0, 0.54.0, 0.54.1, 0.55.0, 0.55.1, 0.55.2, 0.56.0, 0.56.1, 0.56.2, 0.57.0, 0.57.1