Skip to main content
Vulnerability Database/CVE-2026-108741

CVE-2026-108741: Shepherd AI SSRF Guard Bypass Vulnerability

CVE-2026-108741 is an SSRF guard bypass flaw in Shepherd AI citation-checker that enables DNS rebinding attacks on internal services. This post covers technical details, affected versions, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-108741 Overview

CVE-2026-108741 is a server-side request forgery (SSRF) guard bypass affecting Shepherd (shepherd-ai) through version 0.3.1. The flaw resides in the citation-checker extra, where the public_url guard validates a resolved address but the subsequent fetch call re-resolves the hostname at connect time. This time-of-check to time-of-use condition [CWE-367] allows DNS rebinding attacks. Attackers who plant a crafted reference URL in a checked document and control its authoritative DNS can rebind the hostname to internal addresses. The resulting GET requests to internal HTTP(S) services are captured in evidence files that the attacker can retrieve.

Critical Impact

Attackers can coerce the citation checker to issue requests to internal services and exfiltrate the responses through evidence files.

Affected Products

  • Shepherd (shepherd-ai) through version 0.3.1
  • The citation-checker extra component
  • Deployments exposing the citation checker to attacker-influenced reference URLs

Discovery Timeline

  • 2026-10-11 - CVE-2026-108741 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-108741

Vulnerability Analysis

The citation checker accepts a reference URL supplied inside a document, validates it against an allowlist policy, then performs an HTTP(S) GET to retrieve the cited content. The guard in network.py resolves the hostname and asserts that the resulting IP is a public address. The downstream fetch routine in fetch.py passes the original hostname to the HTTP client, which performs its own DNS lookup. The two independent resolutions create a race window that an attacker-controlled authoritative DNS server can exploit by returning different answers on each query.

Successful exploitation returns the body of the internal HTTP response and persists it inside evidence files produced by the checker. Internal metadata endpoints, administrative dashboards, and unauthenticated microservices are typical targets.

Root Cause

The root cause is a classic time-of-check to time-of-use (TOCTOU) defect [CWE-367]. The validation layer and the transport layer each perform an independent getaddrinfo call. There is no mechanism to pin the validated IP address through the connect phase, so the hostname can be re-resolved to a private RFC1918 address after passing the guard.

Attack Vector

An attacker hosts a domain whose authoritative DNS alternates between a public IP and an internal IP such as 127.0.0.1, 169.254.169.254, or an internal RFC1918 address. The attacker then plants a reference URL pointing to that domain inside a document processed by Shepherd. The guard resolves the public IP and allows the fetch. The HTTP client re-resolves and connects to the internal IP, retrieving the response, which is written to the evidence file for later retrieval.

Technical details and proof-of-concept analysis are published in the HackMD DNS Rebinding Analysis and the VulnCheck Shepherd SSRF Advisory.

Detection Methods for CVE-2026-108741

Indicators of Compromise

  • Evidence files produced by the citation checker containing responses from internal IP ranges or hostnames.
  • Outbound DNS queries from the Shepherd host that return rapidly changing answers with low TTL values for the same name.
  • Shepherd process connections to RFC1918, loopback, link-local, or cloud metadata addresses (169.254.169.254).
  • Reference URLs in processed documents pointing to recently registered or uncategorized domains.

Detection Strategies

  • Compare the IP resolved by the guard with the IP used by the subsequent connection and alert on mismatches.
  • Inspect generated evidence files for HTTP response headers and bodies consistent with internal services.
  • Correlate Shepherd runtime egress with DNS logs to flag names that resolve to both public and private addresses within short windows.

Monitoring Recommendations

  • Log the resolved address used by fetch in the citation checker and forward to a central store for review.
  • Monitor the host for connections targeting cloud metadata and internal management endpoints.
  • Alert on citation checker runs that complete with evidence files larger than expected or containing non-HTML content from unknown origins.

How to Mitigate CVE-2026-108741

Immediate Actions Required

  • Restrict the Shepherd host network egress using a firewall or egress proxy that denies RFC1918, loopback, link-local, and cloud metadata ranges.
  • Disable or isolate the citation-checker extra until a patched version is deployed.
  • Reject documents containing reference URLs pointing to domains outside an operator-controlled allowlist.

Patch Information

At publication, the advisory identifies all versions through 0.3.1 as affected. Monitor the upstream GitHub Shepherd Project and the VulnCheck Shepherd SSRF Advisory for a fixed release. A durable fix must either pin the validated IP address through the socket connect call or perform a single resolution and pass the resolved address directly to the HTTP client.

Workarounds

  • Route all Shepherd outbound HTTP(S) traffic through an egress proxy that enforces the public-only policy.
  • Configure the host resolver to refuse answers in private, loopback, and link-local ranges for external zones using DNS filtering.
  • Run the citation checker inside a network namespace or container with no route to internal subnets or metadata services.
bash
# Example egress firewall rules blocking private and metadata ranges for the Shepherd service user
iptables -A OUTPUT -m owner --uid-owner shepherd -d 127.0.0.0/8 -j REJECT
iptables -A OUTPUT -m owner --uid-owner shepherd -d 10.0.0.0/8 -j REJECT
iptables -A OUTPUT -m owner --uid-owner shepherd -d 172.16.0.0/12 -j REJECT
iptables -A OUTPUT -m owner --uid-owner shepherd -d 192.168.0.0/16 -j REJECT
iptables -A OUTPUT -m owner --uid-owner shepherd -d 169.254.0.0/16 -j REJECT

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.