CVE-2024-35192
Trivy possibly leaks registry credential when scanning images from malicious registries
Trivy is a security scanner. Prior to 0.51.2, 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. Systems are not affected if the default credential provider chain is unable to obtain valid credentials. This vulnerability only applies when scanning container images directly from a registry. This vulnerability is fixed in 0.51.2.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.5
Trivy possibly leaks registry credential when scanning images from malicious registries
Trivy is a security scanner. Prior to 0.51.2, 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. Systems are not affected if the default credential provider chain is unable to obtain valid credentials. This vulnerability only applies when scanning container images directly from a registry. This vulnerability is fixed in 0.51.2.
- Record
CVE-2024-35192- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-522
- Updated
- 2026-11-02
EUVDEUVD-2024-1860
5.5
Trivy is a security scanner. Prior to 0.51.2, 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. Systems are not affected if the default credential provider chain is unable to obtain valid credentials. This vulnerability only applies when scanning container images directly from a registry. This vulnerability is fixed in 0.51.2.
- Record
EUVD-2024-1860- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-xcq4-m2r3-cmrj
5.5
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:
- The environment variables contain static AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) that have access to ECR.
- Within a Pod running on an EKS cluster that has been assigned a role with access to ECR using an IAM Roles for Service Accounts (IRSA) annotation.
- etc.
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.
- Record
GHSA-xcq4-m2r3-cmrj- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-522
- Updated
- 2026-11-02
NVD
5.5
Trivy is a security scanner. Prior to 0.51.2, 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. Systems are not affected if the default credential provider chain is unable to obtain valid credentials. This vulnerability only applies when scanning container images directly from a registry. This vulnerability is fixed in 0.51.2.
- Record
CVE-2024-35192- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-522
- Updated
- 2026-11-02
OSV
5.5
Trivy possibly leaks registry credential when scanning images from malicious registries
Trivy is a security scanner. Prior to 0.51.2, 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. Systems are not affected if the default credential provider chain is unable to obtain valid credentials. This vulnerability only applies when scanning container images directly from a registry. This vulnerability is fixed in 0.51.2.
- Record
CVE-2024-35192- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-522
- Updated
- 2026-11-02
OSVGHSA-xcq4-m2r3-cmrj
5.5
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:
- The environment variables contain static AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) that have access to ECR.
- Within a Pod running on an EKS cluster that has been assigned a role with access to ECR using an IAM Roles for Service Accounts (IRSA) annotation.
- etc.
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.
- Record
GHSA-xcq4-m2r3-cmrj- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-522
- Updated
- 2026-11-02
Show 4 moreShow less
OSVGO-2024-2870 No score
Credential leakage in github.com/aquasecurity/trivy
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.
- Record
GO-2024-2870- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:0268-1 No score
Security update for trivy
trivy was updated to fix the following issues:
Update to version 0.54.1:
- fix(flag): incorrect behavior for deprected flag
--clear-cache[backport: release/v0.54] (#7285) - fix(java): Return error when trying to find a remote pom to avoid segfault [backport: release/v0.54] (#7283)
- fix(plugin): do not call GitHub content API for releases and tags [backport: release/v0.54] (#7279)
- docs: update ecosystem page reporting with plopsec.com app (#7262)
- feat(vex): retrieve VEX attestations from OCI registries (#7249)
- feat(sbom): add image labels into
SPDXandCycloneDXreports (#7257) - refactor(flag): return error if both
--download-db-onlyand--download-java-db-onlyare specified (#7259) - fix(nodejs): detect direct dependencies when using
latestversion for filesyarn.lock+package.json(#7110) - chore: show VEX notice for OSS maintainers in CI environments (#7246)
- feat(vuln): add
--pkg-relationships(#7237) - docs: show VEX cli pages + update config file page for VEX flags (#7244)
- fix(dotnet): show
nuget package dir not foundlog only when checkingnugetpackages (#7194) - feat(vex): VEX Repository support (#7206)
- fix(secret): skip regular strings contain secret patterns (#7182)
- feat: share build-in rules (#7207)
- fix(report): hide empty table when all secrets/license/misconfigs are ignored (#7171)
- fix(cli): error on missing config file (#7154)
- fix(secret): update length of
hugging-face-access-token(#7216) - feat(sbom): add vulnerability support for SPDX formats (#7213)
- fix(secret): trim excessively long lines (#7192)
- chore(vex): update subcomponents for CVE-2023-42363/42364/42365/42366 (#7201)
- fix(server): pass license categories to options (#7203)
- feat(mariner): Add support for Azure Linux (#7186)
- docs: updates config file (#7188)
- refactor(fs): remove unused field for CompositeFS (#7195)
- fix: add missing platform and type to spec (#7149)
- feat(misconf): enabled China configuration for ACRs (#7156)
- fix: close file when failed to open gzip (#7164)
- docs: Fix PR documentation to use GitHub Discussions, not Issues (#7141)
- docs(misconf): add info about limitations for terraform plan json (#7143)
- chore: add VEX for Trivy images (#7140)
- chore: add VEX document and generator for Trivy (#7128)
- fix(misconf): do not evaluate TF when a load error occurs (#7109)
- feat(cli): rename
--vuln-typeflag to--pkg-typesflag (#7104) - refactor(secret): move warning about file size after
IsBinarycheck (#7123) - feat: add openSUSE tumbleweed detection and scanning (#6965)
- test: add missing advisory details for integration tests database (#7122)
- fix: Add dependencyManagement exclusions to the child exclusions (#6969)
- fix: ignore nodes when listing permission is not allowed (#7107)
- fix(java): use
go-mvn-versionto removePackageduplicates (#7088) - refactor(secret): add warning about large files (#7085)
- feat(nodejs): add license parser to pnpm analyser (#7036)
- refactor(sbom): add sbom prefix + filepaths for decode log messages (#7074)
- feat: add
log.FilePath()function for logger (#7080) - chore: bump golangci-lint from v1.58 to v1.59 (#7077)
- perf(debian): use
bytes.IndexinemptyLineSplitto cut allocation (#7065) - refactor: pass DB dir to trivy-db (#7057)
- docs: navigate to the release highlights and summary (#7072)
Update to version 0.53.0 (bsc#1227022, CVE-2024-6257):
- feat(conda): add licenses support for
environment.ymlfiles (#6953) - fix(sbom): fix panic when scanning SBOM file without root component into SBOM format (#7051)
- feat: add memory cache backend (#7048)
- fix(sbom): use package UIDs for uniqueness (#7042)
- feat(php): add installed.json file support (#4865)
- docs: ✨ Updated ecosystem docs with reference to new community app (#7041)
- fix: use embedded when command path not found (#7037)
- refactor: use google/wire for cache (#7024)
- fix(cli): show info message only when --scanners is available (#7032)
- chore:…
- Record
openSUSE-SU-2024:0268-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:0269-1 No score
Security update for trivy
trivy was updated to fix the following issues:
Update to version 0.54.1:
- fix(flag): incorrect behavior for deprected flag
--clear-cache[backport: release/v0.54] (#7285) - fix(java): Return error when trying to find a remote pom to avoid segfault [backport: release/v0.54] (#7283)
- fix(plugin): do not call GitHub content API for releases and tags [backport: release/v0.54] (#7279)
- release: v0.54.0 [main] (#7075)
- docs: update ecosystem page reporting with plopsec.com app (#7262)
- feat(vex): retrieve VEX attestations from OCI registries (#7249)
- feat(sbom): add image labels into
SPDXandCycloneDXreports (#7257) - refactor(flag): return error if both
--download-db-onlyand--download-java-db-onlyare specified (#7259) - fix(nodejs): detect direct dependencies when using
latestversion for filesyarn.lock+package.json(#7110) - chore: show VEX notice for OSS maintainers in CI environments (#7246)
- feat(vuln): add
--pkg-relationships(#7237) - docs: show VEX cli pages + update config file page for VEX flags (#7244)
- fix(dotnet): show
nuget package dir not foundlog only when checkingnugetpackages (#7194) - feat(vex): VEX Repository support (#7206)
- fix(secret): skip regular strings contain secret patterns (#7182)
- feat: share build-in rules (#7207)
- fix(report): hide empty table when all secrets/license/misconfigs are ignored (#7171)
- fix(cli): error on missing config file (#7154)
- fix(secret): update length of
hugging-face-access-token(#7216) - feat(sbom): add vulnerability support for SPDX formats (#7213)
- fix(secret): trim excessively long lines (#7192)
- chore(vex): update subcomponents for CVE-2023-42363/42364/42365/42366 (#7201)
- fix(server): pass license categories to options (#7203)
- feat(mariner): Add support for Azure Linux (#7186)
- docs: updates config file (#7188)
- refactor(fs): remove unused field for CompositeFS (#7195)
- fix: add missing platform and type to spec (#7149)
- feat(misconf): enabled China configuration for ACRs (#7156)
- fix: close file when failed to open gzip (#7164)
- docs: Fix PR documentation to use GitHub Discussions, not Issues (#7141)
- docs(misconf): add info about limitations for terraform plan json (#7143)
- chore: add VEX for Trivy images (#7140)
- chore: add VEX document and generator for Trivy (#7128)
- fix(misconf): do not evaluate TF when a load error occurs (#7109)
- feat(cli): rename
--vuln-typeflag to--pkg-typesflag (#7104) - refactor(secret): move warning about file size after
IsBinarycheck (#7123) - feat: add openSUSE tumbleweed detection and scanning (#6965)
- test: add missing advisory details for integration tests database (#7122)
- fix: Add dependencyManagement exclusions to the child exclusions (#6969)
- fix: ignore nodes when listing permission is not allowed (#7107)
- fix(java): use
go-mvn-versionto removePackageduplicates (#7088) - refactor(secret): add warning about large files (#7085)
- feat(nodejs): add license parser to pnpm analyser (#7036)
- refactor(sbom): add sbom prefix + filepaths for decode log messages (#7074)
- feat: add
log.FilePath()function for logger (#7080) - chore: bump golangci-lint from v1.58 to v1.59 (#7077)
- perf(debian): use
bytes.IndexinemptyLineSplitto cut allocation (#7065) - refactor: pass DB dir to trivy-db (#7057)
- docs: navigate to the release highlights and summary (#7072)
Update to version 0.53.0 (bsc#1227022, CVE-2024-6257):
- release: v0.53.0 [main] (#6855)
- feat(conda): add licenses support for
environment.ymlfiles (#6953) - fix(sbom): fix panic when scanning SBOM file without root component into SBOM format (#7051)
- feat: add memory cache backend (#7048)
- fix(sbom): use package UIDs for uniqueness (#7042)
- feat(php): add installed.json file support (#4865)
- docs: ✨ Updated ecosystem docs with reference to new community app (#7041)
- fix: use embedded when command path not found (#7037)
- refactor: use google/wire for cache (#7024)
- fix(cli): show…
- Record
openSUSE-SU-2024:0269-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14030-1 No score
trivy-0.52.0-1.1 on GA media
These are all security issues fixed in the trivy-0.52.0-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14030-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/aquasecurity/trivyGo |
before 0.51.2 | 0.51.2 |
trivySUSE:Package Hub 15 SP5 From an advisory covering 3 CVEs |
before 0.54.1-bp155.2.3.1 | 0.54.1-bp155.2.3.1 |
trivyopenSUSE:Leap 15.5 From an advisory covering 3 CVEs |
before 0.54.1-bp155.2.3.1 | 0.54.1-bp155.2.3.1 |
trivySUSE:Package Hub 15 SP6 From an advisory covering 3 CVEs |
before 0.54.1-bp156.2.3.1 | 0.54.1-bp156.2.3.1 |
trivyopenSUSE:Leap 15.6 From an advisory covering 3 CVEs |
before 0.54.1-bp156.2.3.1 | 0.54.1-bp156.2.3.1 |
trivyopenSUSE:Tumbleweed |
before 0.52.0-1.1 | 0.52.0-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-35192 is a medium vulnerability (CVSS 5.5) in Aquasecurity Trivy, published May 20, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.19%, the 8th percentile. Fixed in github.com/aquasecurity/trivy 0.51.2.
References
github.com/aquasecurity/trivy/security/advisories/GHSA-xcq4-m2r3-cmrj
github.com/aquasecurity/trivy/commit/e7f14f729de259551203f313e57d2d9d3aa2ff87
nvd.nist.gov/vuln/detail/CVE-2024-35192
github.com/advisories/GHSA-xcq4-m2r3-cmrj
github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35192.json
github.com/aquasecurity/trivy
Show 7 moreShow less
lists.opensuse.org/archives/list/[email protected]/thread/6XAQOEGAUMX4BBTNYDJHKA4H3VD5H2PQ
bugzilla.suse.com/1224781
bugzilla.suse.com/1227022
suse.com/security/cve/CVE-2023-42363
suse.com/security/cve/CVE-2024-35192
suse.com/security/cve/CVE-2024-6257
lists.opensuse.org/archives/list/[email protected]/thread/OQ7DWO7D4FBUA7VBLBTF3YWOOT4647TB
Left out here: the rest of 2 source descriptions. The JSON record has them.