/

CVE-2026-62240

Severity:

HIGH RISK

(7.4)

SSRF (CWE-918) via URL Validation Bypass in CrewAI

CVE-2026-62240

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal services and metadata endpoints

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

CrewAI contains a server-side request forgery issue in its URL validation logic, where URLs are validated once and then used unchanged.

By abusing redirects or DNS rebinding, an attacker can coerce the server into making requests to internal services or cloud metadata endpoints, potentially exposing sensitive data or internal network behavior.

Affected context

This vulnerability affects deployments of CrewAI that rely on the validate_url function to enforce network egress restrictions for server-initiated HTTP requests.

The issue is most relevant when the application accepts user-supplied URLs and then makes outbound requests on behalf of users, such as fetching remote resources, calling webhooks, or integrating with third-party APIs.

Environments with accessible internal services, service meshes, or cloud instance metadata endpoints are at particular risk when the validated URL is later requested by backend components.

Exploit preconditions

  • Attack surface: Any CrewAI feature or integration path that accepts user-controlled URLs and causes the backend to perform HTTP requests to those URLs.
  • Required access: Ability to supply or influence the target URL (e.g., via API parameters, configuration fields, or workflow definitions).
  • Trigger point: The backend uses the URL after a one-time validate_url check that does not account for redirects or changes in DNS resolution.
  • Why exploitation is possible: The validation logic performs a single DNS resolution and blocklist check on the initially supplied hostname, then returns the original URL unchanged, allowing redirections or DNS rebinding to point subsequent requests to internal IP ranges or metadata services.

Why this happens

The core issue is a flawed trust model around network destinations, aligning with CWE-918: Server-Side Request Forgery (SSRF).

The validate_url function performs a one-shot DNS lookup and blocklist comparison only on the initial URL and then passes that original URL forward for later use.

Because the actual network request may follow redirects or be affected by DNS rebinding, the eventual destination can differ from what was validated, breaking the assumption that a single pre-request check is sufficient.

This design treats user-controlled URLs as trustworthy after minimal validation rather than enforcing strict, end-to-end control over the effective request target.

Potential impact

  • Access to internal HTTP services not directly exposed to the internet
  • Retrieval of cloud instance metadata (e.g., temporary credentials, tokens, or configuration)
  • Network scanning or probing of internal IP ranges from the server's perspective
  • Bypassing network segmentation or firewall controls by pivoting through the application server
  • Potential exposure of sensitive configuration data or service endpoints

General mitigation guidance

Effective mitigation centers on constraining outbound requests and correctly validating the final destination of any server-side HTTP call.

Common defensive patterns include:

  • Enforcing allowlists of hostnames or domains and resolving them at request time, not just at initial validation.
  • Blocking requests to private, link-local, loopback, and metadata address ranges at the networking or HTTP client layer.
  • Disabling or strictly limiting automatic redirects for requests that originate from user-supplied URLs, or re-validating the destination after each redirect.
  • Using network-level egress controls (e.g., firewall rules, VPC egress policies, service mesh policies) so application servers cannot reach sensitive internal or metadata endpoints.
  • Treating all user-supplied URLs as untrusted and normalizing and parsing them with robust URL parsing utilities before use.

How teams detect issues like this

Detection strategies generally focus on identifying SSRF patterns in code and monitoring runtime behavior:

  • Static analysis rules that flag server-side HTTP calls using user-controlled URLs without strict allowlists or IP range checks.
  • Code review checklists that require verification of URL validation logic, redirect handling, and DNS resolution practices.
  • Centralized HTTP client wrappers or network gateways that log, restrict, and alert on requests to internal or metadata IP ranges.
  • Runtime monitoring and IDS/IPS rules that detect unusual outbound connections from application servers to internal infrastructure or cloud metadata endpoints.
  • Use of security scanning tools that simulate SSRF probes and DNS rebinding scenarios to validate defenses.

Sources

SourceLink
github.comgithub.com/crewAIInc/crewAI/commit/5d4851eac797cafc45b726f65747fe2c9520fc42
github.comgithub.com/crewAIInc/crewAI/issues/6520
github.comgithub.com/crewAIInc/crewAI/pull/6331
github.comgithub.com/crewAIInc/crewAI/releases/tag/1.15.1
vulncheck.comvulncheck.com/advisories/crewai-ssrf-filter-bypass-via-http-redirect-in-scrape-tools

Frequently asked

questions

Yes. If a remote user or external system can provide URLs that CrewAI later requests on the server side, they can attempt to exploit this SSRF behavior without local access.

The attacker needs the ability to control or influence a URL that the backend will validate with validate_url and subsequently request. No direct network access to internal services is required, because the application server acts as a proxy.

The safest pattern is to strictly limit outbound destinations (e.g., to a small, explicit allowlist), re-validate the actual request target after DNS resolution and any redirect, and block all requests to private or metadata address ranges at both the application and network layers.

Design any feature that makes server-side HTTP requests under the assumption that URLs are hostile: centralize HTTP client usage, enforce allowlists, disable or tightly control redirects, implement layered egress controls, and include SSRF-specific checks in code review and automated security testing.

Find out what's already
exploitable in your codebase.