Summary
Crawl4AI's Docker API endpoints accept webhook URLs without validating their destinations, enabling server-side request forgery (SSRF).
An attacker who can submit crafted webhook URLs may force the server to call internal services or cloud metadata endpoints, risking data exposure and environment compromise.
Affected context
This vulnerability appears in Crawl4AI deployments where the Docker API server exposes the /crawl/job and /llm/job endpoints and allows user-controlled webhook URLs.
It is most relevant in environments where:
- The Docker API server has network access to private IP ranges or internal Docker networks
- The runtime environment can reach cloud metadata services (e.g.,
169.254.169.254) - Webhook URLs are accepted from clients without strict destination or scheme validation
Exploit preconditions
- Attack surface: HTTP(S) access to the Crawl4AI Docker API server, specifically
/crawl/joband/llm/job. - Required access: Ability to submit or influence job requests that include a webhook URL parameter.
- Trigger point: Job creation or submission where the application stores and later issues callbacks to the provided webhook URL.
- Why exploitation is possible: The server trusts user-supplied webhook URLs and issues outgoing HTTP requests without checking IP ranges, hostnames, or protocols, allowing attackers to pivot those requests toward internal or sensitive endpoints.
Why this happens
The core issue is unvalidated use of user-controlled URLs for outbound server requests, mapping directly to CWE-918: Server-Side Request Forgery (SSRF).
By treating webhook destinations as inherently safe, the Docker API server acts as a proxy into its own reachable network space, including internal services and metadata endpoints.
The insecure pattern is the absence of robust URL validation and network egress controls when the server performs callbacks or notifications to user-specified destinations.
Potential impact
- Exposure of cloud instance metadata and temporary credentials
- Access to internal HTTP services not intended to be publicly reachable
- Enumeration of internal network structure via response differences
- Potential misuse of internal APIs leading to configuration changes or data access
- Use of the server as a blind SSRF probe for further attacks
General mitigation guidance
Effective mitigation typically focuses on reducing trust in user-supplied callback destinations and constraining outbound requests from the server.
Common defensive patterns include:
- Implementing strict URL validation for webhooks (allowed schemes, hostnames, and ports)
- Using an explicit allowlist for external callback domains instead of arbitrary URLs
- Blocking requests to private IP ranges, link-local addresses, and metadata endpoints at the application level
- Applying network-layer egress controls so application servers cannot directly reach sensitive internal or metadata services
- Designing webhook processing with least privilege, isolating outbound HTTP clients in restricted network contexts
How teams detect issues like this
Detection often involves a combination of code-level and infrastructure-level checks:
- Static analysis rules or secure coding guidelines that flag unvalidated use of user-controlled URLs for outbound HTTP requests
- Code review practices that look for webhook, callback, or notification URL handling without domain or IP restrictions
- Runtime monitoring of outbound traffic from application nodes to internal ranges or metadata IPs, with alerts on anomalies
- Policy enforcement in CI/CD that requires SSRF-safe URL validation helpers and prohibits direct use of generic HTTP clients with user-supplied destinations

