GO-2026-4392: malcontent's OCI image scanning could expose registry credentials
malcontent discovers supply-chain compromises through. context, differential analysis, and YARA. Starting in version 0.10.0 and prior to version 1.20.3, malcontent could be made to expose Docker registry credentials if it scanned a specially crafted OCI image reference. malcontent uses google/go-containerregistry for OCI image pulls, which by default uses the Docker credential keychain. A malicious registry could return a WWW-Authenticate header redirecting token authentication to an attacker-controlled endpoint, causing credentials to be sent to that endpoint. Version 1.20.3 fixes the issue by defaulting to anonymous auth for OCI pulls.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
malcontentto a version that resolves this vulnerability.Fixed in 1.20.3
Event History
Frequently Asked Questions
Who is exposed to credential disclosure?
Users of malcontent from version 0.10.0 through versions before 1.20.3 are exposed when scanning OCI image references while Docker registry credentials are available through the default Docker credential keychain.
What does an attacker need to exploit this?
An attacker needs to cause malcontent to scan a specially crafted OCI image reference served by a malicious registry. The registry can return a WWW-Authenticate header that redirects token authentication to an attacker-controlled endpoint.
Are default settings affected?
Yes. Before 1.20.3, OCI pulls use the Docker credential keychain by default, allowing registry credentials to be sent during the redirected authentication flow. Version 1.20.3 changes the default to anonymous authentication for OCI pulls.
What should be done if an immediate upgrade is not possible?
Avoid scanning untrusted or specially supplied OCI image references with affected malcontent versions, particularly on systems where Docker registry credentials are configured. The provided data identifies version 1.20.3 as the version that defaults OCI pulls to anonymous authentication.