| Field | Value |
|---|---|
| Severity | High |
| Type | SSRF -- unvalidated URL in web_crawl httpx fallback allows internal network access |
| Affected | src/praisonai-agents/praisonaiagents/tools/web_crawl_tools.py:133-180 |
web_crawl's httpx fallback path passes user-supplied URLs directly to httpx.AsyncClient.get() with follow_redirects=True and no host validation. An LLM agent tricked into crawling an internal URL can reach cloud metadata endpoints (169.254.169.254), internal services, and localhost. The response content is returned to the agent and may appear in output visible to the attacker.
This fallback is the default crawl path on a fresh PraisonAI installation (no Tavily key, no Crawl4AI installed).
The vulnerable code is in tools/web_crawl_tools.py:148-155:
async with httpx.AsyncClient(
follow_redirects=True,
timeout=httpx.Timeout(30)
) as client:
response = await client.get(url) # url from agent tool call, no validation
No scheme restriction, no hostname resolution, no private/link-local IP check. follow_redirects=True also means an attacker can use an open redirect on a public URL to bounce the request into internal networks.
download_file in file_tools.py:295-318, by contrast, validates URLs before requesting:
parsed = urllib.parse.urlsplit(url)
if parsed.scheme not in ("http", "https"):
return "Error: Only HTTP(S) URLs are allowed"
hostname = parsed.hostname
addr = ipaddress.ip_address(socket.gethostbyname(hostname))
if addr.is_private or addr.is_loopback or addr.is_link_local:
return "Error: Access to internal network addresses is not allowed"
web_crawl has none of this.
Direct agent interaction:
from praisonaiagents import Agent
from praisonaiagents.tools import web_crawl
agent = Agent(
instructions="You are a research assistant.",
tools=[web_crawl],
)
agent.chat(
"Fetch the content from...
0.13.230.14.00.14.10.14.100.14.110.14.120.14.140.14.150.14.160.14.2+156 more1.5.128Exploitability
AV:NAC:LAT:PPR:NUI:PVulnerable System
VC:HVI:NVA:NSubsequent System
SC:HSI:LSA:NCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:L/SA:N