Summary
Renovate may forward container registry credentials to an attacker-controlled host when it follows a pagination URL supplied in an HTTP Link header without confirming that the URL shares the registry's origin. This can expose credentials when a project uses Docker dependencies and interacts with a malicious or compromised registry.
Affected context
The issue occurs in Renovate's container image tag or digest listing workflow when all of the following generally apply:
- The repository contains Docker or other container dependencies.
- Renovate communicates with a registry using credentials.
- The registry returns pagination links through the HTTP Link header.
- A supplied pagination URL points to a different, attacker-controlled origin.
Exploit preconditions
- Attack surface: HTTP responses from a container registry used for dependency discovery
- Required access: The attacker must control or compromise the registry, or otherwise influence its pagination response.
- Trigger point: Renovate follows a registry-provided pagination link while listing image tags or digests.
- Why exploitation is possible: Credentials associated with the original registry may be attached to a follow-up request without a same-origin check.
Why this happens
The vulnerability results from trusting a server-supplied pagination URL without validating its origin against the original registry endpoint. This allows an external response to redirect a credential-bearing request to another host, mapping to CWE-601: URL Redirection to Untrusted Site. The insecure pattern is treating externally supplied navigation targets as trusted while preserving authentication state across requests.
Potential impact
- Registry credentials may be disclosed to an attacker-controlled host.
- Attackers could authenticate to private container registries.
- Private image metadata, tags, and digests could be exposed.
- Compromised credentials could enable unauthorized image access or modification.
- Downstream builds and deployments could be affected through image tampering.
General mitigation guidance
Mitigation generally focuses on treating pagination links as untrusted input and preventing credentials from crossing trust boundaries.
Common defensive patterns include:
- Enforcing same-origin or explicitly allowlisted-origin checks before following pagination URLs.
- Constructing follow-up requests only from trusted registry endpoints rather than accepting arbitrary absolute URLs.
- Removing authentication headers when a destination is not explicitly trusted.
- Restricting registry credentials to the minimum repositories and operations required.
- Using short-lived, narrowly scoped tokens where supported.
- Avoiding configurations that disable cross-origin protections unless the destination is controlled and independently verified.
How teams detect issues like this
Organizations can detect related risks through:
- Static analysis for HTTP redirect or pagination handlers that preserve authorization headers across origins.
- Code review checks for trust decisions based solely on Link headers or other server-controlled URLs.
- Tests that return cross-origin pagination links and verify that credentials are not sent to the alternate host.
- Network monitoring for registry credentials or authenticated requests sent to unexpected domains.
- Policy enforcement that restricts dependency automation traffic to approved registry origins.
Automated security review tools may help identify missing origin validation and unsafe credential-forwarding patterns.

