Summary
PraisonAI's web_crawl tool contains a server-side request forgery issue where hostnames are validated once but resolved again at connect time without pinning the original IP.
An attacker can leverage DNS rebinding to bypass the SSRF protections and have the server retrieve HTTP response bodies from internal or loopback-only services.
Affected context
This vulnerability appears in deployments that expose PraisonAI's web_crawl tool or similar functionality to user-controlled URLs.
It arises when hostname-based allowlisting or validation is performed at an initial check phase, but the actual outbound HTTP connection re-resolves the hostname later without enforcing that the IP address remains consistent.
Environments where PraisonAI runs with network access to private, loopback, or cloud metadata endpoints are more affected, as the tool can be abused as a proxy into those internal services.
Exploit preconditions
- Attack surface: Any interface (web UI, API, plugin) that lets users supply URLs or hostnames to the web_crawl tool.
- Required access: Ability to submit or influence crawl requests; this may be unauthenticated or low-privilege depending on deployment.
- Trigger point: The tool's outbound HTTP request phase, where the hostname is re-resolved just before connection.
- Why exploitation is possible: The protection logic validates hostnames at "check" time only, relying on DNS resolution there, but does not pin or reuse the validated IP. An attacker controlling DNS records can change responses between check and connect, redirecting the server's request to internal addresses despite earlier validation.
Why this happens
The core issue is an SSRF defense that relies solely on hostname-based validation without binding that hostname to a specific IP address for the duration of the request lifecycle.
At a high level, this maps to CWE-918: Server-Side Request Forgery (SSRF) where a server-side component performs network requests based on attacker-influenced input.
The web_crawl tool checks whether a target appears safe at validation time, but later performs a fresh DNS lookup when initiating the actual connection.
This mismatch allows DNS rebinding: a hostname initially pointing to a benign external IP is later re-resolved to an internal IP, causing the server to send requests into private or loopback-only networks and return their HTTP response bodies to the attacker.
Potential impact
- Unauthorized reading of HTTP response bodies from internal web applications and APIs
- Exposure of configuration data, status pages, or administrative consoles on private networks
- Access to loopback-only services that were never intended to be reachable externally
- Potential retrieval of cloud or container metadata, which could lead to further credential exposure
- Increased risk of pivoting into internal systems using information gained via SSRF responses
General mitigation guidance
Mitigation generally focuses on hardening outbound request handling and decoupling user input from direct network reachability.
Useful patterns include:
- Enforcing IP pinning: resolve the hostname once during validation and reuse that IP for the actual request, rejecting any changes or ambiguous records.
- Applying strict network-level allowlists that limit where server-side tools can connect (e.g., egress controls that block private and loopback ranges).
- Normalizing and validating both hostname and resolved IP against policy, explicitly rejecting private, loopback, and link-local address spaces.
- Using dedicated proxy or sandbox services for user-driven crawls, with limited connectivity and no access to sensitive internal networks.
- Running PraisonAI components with least-privilege network access, reducing visibility into internal infrastructure wherever possible.
How teams detect issues like this
Effective detection approaches focus on both code-level patterns and runtime behavior:
- Static analysis and code review looking for functions or tools that issue outbound HTTP requests based on user-supplied URLs or hostnames, especially where validation and connect phases use separate resolution logic.
- Review of SSRF protections to ensure that checks include IP-based restrictions, not just hostname allowlists or simple pattern matching.
- Network monitoring and egress logs that highlight unusual outbound traffic from PraisonAI components to private or loopback address space.
- Policy enforcement in CI/CD to flag new code that introduces direct HTTP client usage without centralized SSRF-safe wrappers.
- Optional use of automated application security testing tools that model SSRF flows and attempt DNS rebinding against crawl-like functionality.

