Description
Shepherd (shepherd-ai) through 0.3.1 contains a server-side request forgery guard bypass in the citation-checker extra because the public_url guard validates a resolved address but fetch re-resolves the hostname at connect time. Attackers who plant a crafted reference URL in a checked document and control its DNS can rebind it to internal addresses, sending GET requests to internal HTTP(S) services and capturing responses in evidence files.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| shepherd-agents | Shepherd | ≤ 0.3.1 | — |
References
- https://hackmd.io/@haind03/shepherd-citation-checker-dns-rebinding-ssrf third-party-advisory
- https://github.com/shepherd-agents/shepherd/blob/d34d5ca334871dfcb5a3dc76dd78045829fa4e56/shepherd/extras/citation-checker/src/shepherd_citation_checker/_engine/network.py#L9-L17 technical-description
- https://github.com/shepherd-agents/shepherd/blob/d34d5ca334871dfcb5a3dc76dd78045829fa4e56/shepherd/extras/citation-checker/src/shepherd_citation_checker/_engine/fetch.py#L34-L55 technical-description
- https://github.com/shepherd-agents/shepherd product
- VulnCheck Advisory: Shepherd through 0.3.1 SSRF via DNS Rebinding in Citation Checker third-party-advisory