Summary
CrewAI has a server-side request forgery (SSRF) vulnerability because its SSRF guard and HTTP client check the wrong URL content, allowing malicious URLs to pass those checks. If an attacker can provide a URL that triggers a server-side request, the request may reach internal or otherwise unintended network resources.
Affected context
The issue occurs in CrewAI's SSRF guard and HTTP client when URL content is checked incorrectly. It may affect request paths that accept attacker-influenced URLs, including tools such as ScrapWebsiteTool, when those URLs are passed through the vulnerable checks.
Exploit preconditions
- Attack surface: A CrewAI feature or tool that makes HTTP requests using a supplied URL
- Required access: Ability to provide or influence the URL used by that request; the description does not specify whether authentication is required
- Trigger point: The HTTP request made after URL validation
- Why exploitation is possible: The SSRF guard and HTTP client check opposite URL content, which can allow a malicious URL to evade the intended safeguards
Why this happens
The underlying bug is inconsistent URL validation: the SSRF guard and HTTP client inspect opposite content rather than reliably validating the destination that will be requested. This maps to CWE-918: Server-Side Request Forgery (SSRF), where an application can be induced to make requests to attacker-selected or unintended destinations.
Potential impact
- An attacker could cause requests to internal services reachable from the application
- Sensitive information may be exposed if an unintended endpoint returns data to the application
- Requests could reach services that perform actions based on incoming requests
- The application's network position may be abused to probe otherwise inaccessible resources
General mitigation guidance
Mitigation generally focuses on validating the actual destination consistently at the point a request is made.
Common defensive patterns include:
- Parse and normalize URLs before applying validation, then validate the exact destination used by the HTTP client
- Allow only necessary schemes, hosts, and ports using restrictive allowlists where practical
- Revalidate destinations after redirects and account for DNS resolution when enforcing network restrictions
- Apply outbound network controls to limit access to internal and sensitive address ranges
- Keep request-making tools and services limited to the network access and privileges they need
How teams detect issues like this
High-level detection approaches include:
- Reviewing URL validation paths to confirm the guard and HTTP client inspect the same normalized destination
- Using static analysis to flag URL inputs that reach HTTP request APIs without consistent validation
- Testing URL handling across redirects, alternate representations, and resolved network destinations
- Enforcing policies that restrict outbound requests to approved destinations
Automated code review tools may help identify inconsistent checks between validation and request execution.

