criticalCVSS 9.8Vulnerability

GHSA-365w-hqf6-vxfg

### Summary Multiple security vulnerabilities in the Crawl4AI Docker API server affecting endpoints for crawling, markdown/LLM extraction, screenshots, PDFs, webhooks, monitoring, JavaScript execution, and configuration. ### Vulnerabilities #### 1. Arbitrary File Write via /screenshot and /pdf (CWE-22, CVSS 9.1) The `output_path` parameter accepts arbitrary filesystem paths with no validation. An attacker can overwrite server files (DoS) or write to any appuser-writable location. **Fix:** Added `validate_output_path()` restricting writes to `CRAWL4AI_OUTPUT_DIR` (/tmp/crawl4ai-outputs by default). Added Pydantic `field_validator` rejecting `..` traversal sequences. #### 2. SSRF via Webhook URL (CWE-918, CVSS 8.6) Webhook URLs in `/crawl/job` and `/llm/job` accept internal/private IPs with no validation, enabling Server-Side Request Forgery against cloud metadata endpoints (169.254.169.254), internal services, and Docker networks. **Fix:** Added `validate_webhook_url()` with blocklist for RFC 1918, loopback, link-local, cloud metadata IPs and hostnames. Validation at both job submission and send time. Explicit `follow_redirects=False`. #### 3. Authentication Bypass on Monitor Endpoints (CWE-306, CVSS 6.5) The monitor router was mounted without `token_dep` dependency, making all monitoring endpoints (including destructive ones like `/monitor/actions/cleanup`) accessible without authentication. **Fix:** Added `dependencies=[Depends(token_dep)]` to monitor router. Added explicit token check on WebSocket `/monitor/ws` endpoint. #### 4. Stored XSS in Monitor Dashboard (CWE-79, CVSS 6.1) URLs and error messages rendered in the monitor dashboard via `innerHTML` without escaping, enabling stored XSS via crafted crawl URLs. **Fix:** Server-side `html.escape()` on URL and error storage. Client-side `escapeHtml()` wrapper on all `innerHTML` template injections. #### 5. Arbitrary JavaScript Execution via /execute_js (CWE-94, CVSS 8.1) The `/execute_js` endpoint a

Properties

ghsa_id
GHSA-365w-hqf6-vxfg
severity
critical
summary
Crawl4AI: Multiple Docker API Vulnerabilities - File Write, SSRF, Auth Bypass, XSS, JS Execution
cvss_score
9.8
cve_id
GHSA-365w-hqf6-vxfg
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
is_ghsa_only
true
ghsa_published
2026-06-16T20:13:30Z
source_url
https://github.com/advisories/GHSA-365w-hqf6-vxfg
ghsa_updated
2026-06-16T20:13:32Z

Related Entities (9)

AFFECTS (1)

[Software]pip/crawl4ai

HAS_WEAKNESS (6)

[Weakness]Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
[Weakness]Use of Hard-coded Credentials
[Weakness]Missing Authentication for Critical Function
[Weakness]Server-Side Request Forgery (SSRF)
[Weakness]Improper Control of Generation of Code ('Code Injection')
[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]pip/crawl4ai

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-365w-hqf6-vxfg (CVSS 9.8) — Ninja Signal Threat Intelligence | Ninja Signal