GO-2024-2870

See a problem?
Source
https://pkg.go.dev/vuln/GO-2024-2870
Import Source
https://vuln.go.dev/ID/GO-2024-2870.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2024-2870
Aliases
Published
2024-05-22T16:46:37Z
Modified
2024-05-22T17:44:36.679905Z
Summary
Credential leakage in github.com/aquasecurity/trivy
Details

A malicious registry can cause Trivy to leak credentials for legitimate registries such as AWS Elastic Container Registry (ECR), Google Cloud Artifact/Container Registry, or Azure Container Registry (ACR) if the registry is scanned from directly using Trivy. These tokens can then be used to push/pull images from those registries to which the identity/user running Trivy has access. 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.

References
Credits
    • @lyoung-confluent

Affected packages

Go / github.com/aquasecurity/trivy

Package

Name
github.com/aquasecurity/trivy
View open source insights on deps.dev
Purl
pkg:golang/github.com/aquasecurity/trivy

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.51.2

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/aquasecurity/trivy/pkg/fanal/image/registry/azure"
        },
        {
            "path": "github.com/aquasecurity/trivy/pkg/fanal/image/registry/ecr",
            "symbols": [
                "ECR.CheckOptions"
            ]
        },
        {
            "path": "github.com/aquasecurity/trivy/pkg/fanal/image/registry/google",
            "symbols": [
                "Registry.CheckOptions"
            ]
        }
    ]
}