Executive brief
PraisonAI agents that include web scraping tools can be tricked into making requests to internal systems (localhost, private networks, cloud metadata services) by using public DNS aliases. An attacker instructing an agent to fetch a specially crafted URL like `http://127.0.0.1.nip.io/admin` will trigger an HTTP request to the internal `127.0.0.1` address, potentially exposing secrets, admin panels, or AWS credentials. This is a dangerous gap in request filtering that can lead to data breaches or cloud account compromise.
Technical details
The vulnerability is a Server-Side Request Forgery (SSRF) bypass in the `_host_is_blocked()` function within `praisonaiagents/tools/spider_tools.py` (lines 26–65). The function checks for literal hostname aliases (e.g., "localhost") and attempts to parse the input as an IP address using `ipaddress.ip_address()` and `socket.inet_aton()`, but it never resolves DNS names. For any real hostname that is not a literal IP (e.g., `127.0.0.1.nip.io`), both parsing attempts fail and the function incorrectly returns `False` (not blocked). Meanwhile, the same protection was correctly implemented in `web_crawl_tools.py` using `socket.gethostbyname()`, creating an exploitable inconsistency. An attacker can craft URLs using public wildcard DNS services to resolve to private IPs (127.0.0.1, 10.x.x.x) or AWS IMDS endpoints (169.254.169.254), enabling full-read SSRF with arbitrary port access. The fix is to add DNS resolution before IP validation, mirroring the pattern already used in `web_crawl_tools.py`.
Affected products
- MervinPraison praisonaiagents < 1.6.58
Timeline
- 2026-06-13: disclosed
- 2026-08-25: patched: Patch released in version 1.6.58