CVE-2026-12566 Overview
CVE-2026-12566 affects the docker_pull module in bbot, an open-source reconnaissance framework maintained by Black Lantern Security. The module extracts the realm parameter from a Docker registry's WWW-Authenticate response header and uses it directly as the authentication endpoint. No validation is performed against the original registry host. An attacker positioned between bbot and a Docker registry can rewrite the header to redirect authentication requests to an attacker-controlled endpoint, exfiltrating bearer tokens. The flaw is categorized under [CWE-918] Server-Side Request Forgery (SSRF).
Critical Impact
A man-in-the-middle attacker can coerce bbot into sending Docker registry credentials and bearer tokens to an arbitrary host of their choosing.
Affected Products
- Black Lantern Security bbot (docker_pull module)
- Versions prior to commit c2f4bc0f4
- Deployments performing authenticated Docker registry enumeration
Discovery Timeline
- 2026-06-17 - CVE-2026-12566 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2026-12566
Vulnerability Analysis
The docker_pull module in bbot performs Docker registry authentication using the standard Bearer token challenge flow defined by the Distribution Registry specification. When the registry returns an HTTP 401 response, the module parses the WWW-Authenticate header to obtain the realm, service, and scope parameters. These values are concatenated to build an authentication URL that bbot then queries to retrieve a bearer token.
The vulnerable implementation never verifies that the realm value points to the same origin as the original registry. An attacker capable of modifying network traffic, such as on an untrusted Wi-Fi network or via TLS interception, can replace the legitimate realm with an attacker-controlled URL. bbot then transmits credentials or scope-bound tokens to that endpoint.
Root Cause
The root cause is missing origin validation on a server-supplied URL parameter. The header parsing logic used naive string splitting and lacked a check ensuring the realm host matched the registry host.
Attack Vector
Exploitation requires a network position that allows the attacker to modify HTTP responses returned to bbot. User interaction is required, since an operator must execute a scan that triggers the docker_pull module against a registry the attacker can intercept. Successful exploitation leaks authentication tokens that may grant access to private container images.
response = await self.helpers.request(url, headers=self.headers, follow_redirects=True)
if response is not None and response.status_code != 401:
return response
- try:
- www_authenticate_headers = response.headers.get("www-authenticate", "")
- realm = www_authenticate_headers.split('realm="')[1].split('"')[0]
- service = www_authenticate_headers.split('service="')[1].split('"')[0]
- scope = www_authenticate_headers.split('scope="')[1].split('"')[0]
- except (KeyError, IndexError):
+ www_auth = response.headers.get("www-authenticate", "")
+ realm, service, scope = self._parse_www_authenticate(www_auth)
+ if not all([realm, service, scope]):
self.log.warning(f"Could not obtain realm, service or scope from {url}")
break
+ if not self._validate_realm(url, realm):
+ break
auth_url = f"{realm}?service={service}&scope={scope}"
auth_response = await self.helpers.request(auth_url)
if not auth_response:
Source: bbot commit c2f4bc0f4. The patch introduces a dedicated _parse_www_authenticate helper and a _validate_realm check that rejects realm URLs whose origin differs from the registry being queried.
Detection Methods for CVE-2026-12566
Indicators of Compromise
- Outbound HTTPS requests from bbot scan hosts to domains unrelated to the targeted Docker registries.
- bbot scan logs containing authentication requests whose host component differs from the registry host in the preceding 401 response.
- Unexpected DNS resolutions for hosts referenced in WWW-Authenticate: Bearer realm=... traffic captures.
Detection Strategies
- Inspect bbot output and module logs for docker_pull events where the auth URL host does not match the registry URL host.
- Apply network monitoring rules that flag HTTP 401 responses containing a realm parameter whose domain differs from the responding server.
- Hunt for outbound traffic from CI/CD or reconnaissance hosts running bbot to newly registered or low-reputation domains.
Monitoring Recommendations
- Capture full request and response metadata for all traffic generated by bbot reconnaissance jobs.
- Enforce egress filtering on hosts running bbot so that only approved registry domains are reachable.
- Alert on Docker registry credential use that originates from unexpected endpoints or geographies.
How to Mitigate CVE-2026-12566
Immediate Actions Required
- Update bbot to a version that includes commit c2f4bc0f4 or later, which adds realm validation.
- Rotate any Docker registry credentials or personal access tokens used by bbot scans against networks where interception was possible.
- Restrict bbot execution to trusted networks that enforce TLS integrity end-to-end.
Patch Information
The fix is delivered in the bbot repository through commit c2f4bc0f4. The patch replaces ad-hoc header parsing with _parse_www_authenticate and validates that the realm URL shares an origin with the original registry request before issuing the authentication call. Operators should pull the latest release and verify the module hash post-deployment.
Workarounds
- Disable the docker_pull module in bbot configuration until the patched version is installed.
- Route bbot traffic through a forward proxy that allow-lists known Docker registry authentication endpoints.
- Run bbot only against registries reachable over verified TLS connections, avoiding networks where header tampering is feasible.
# Disable the docker_pull module via bbot CLI until patched
bbot -t targets.txt -em docker_pull
# Or upgrade to the patched version
pip install --upgrade bbot
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

