CVE-2026-57571 — Vulnerability in crawl4ai — CVE Details
Crawl4AI: Arbitrary file write (path traversal) in crawler downloads can lead to RCE
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.81%). Schedule for your next planned update.
Does your project use an affected crawl4ai version?
Paste your requirements.txt to check it for CVE-2026-57571 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
When the crawler saves a downloaded file, the destination filename was taken from attacker-influenced input and joined to the downloads directory with no confinement. A filename containing an absolute path (e.g. /etc/cron.d/evil) or ../ traversal escaped the downloads directory, giving an arbitrary file write with attacker-controlled contents. Because the written bytes are attacker-controlled, this escalates to remote code execution (overwriting a shell rc-file, ~/.ssh/authorized_keys, a cron entry, or a Python module on the import path).
Affected paths
Two download sinks in crawl4ai/async_crawler_strategy.py:
- HTTP crawler (
AsyncHTTPCrawlerStrategy): the filename is parsed from the responseContent-Dispositionheader by_extract_filename()and written viaaiofiles.open(filepath, 'wb'). Reachable directly via the SDK, and via the unauthenticated Docker/crawlendpoint when anHTTPCrawlerConfigis supplied. - Browser crawler (
AsyncPlaywrightCrawlerStrategy): the download'ssuggested_filename(controllable by the visited page) is joined todownloads_pathand written viadownload.save_as().
The HTTP-strategy sink is reachable pre-auth on the default Docker deployment; both are reachable for SDK users simply by crawling an attacker-controlled URL. The default Playwright crawl path that does not trigger a download is unaffected.
Impact
Arbitrary file write with attacker-controlled content as the user running the crawler, escalating to remote code execution.
Fix
Both sinks now resolve the destination through a single hardened helper (_safe_download_filepath) that reduces the attacker-influenced name to a bare basename (dropping absolute paths and .. components) and re-checks, via realpath, that the resolved path stays inside the downloads root (defeating symlink/TOCTOU escapes). A traversal attempt is rejected; normal downloads are unchanged.
Workarounds
- Upgrade to the patched version (0.9.0).
- Run the crawler as an unprivileged user with a dedicated, isolated downloads directory on a volume with no sensitive paths writable.
- Enable authentication (
CRAWL4AI_API_TOKEN) on the Docker server.
Credits
Y4tacker - reported the Content-Disposition path traversal in the HTTP crawler with a clear PoC and a basename + realpath-containment fix recommendation.
Advisory Timeline
- First published June 18, 2026 (161 days ago).
- Last revised July 13, 2026 — 25 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "crawl4ai>=0.9.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| crawl4ai PyPI · Affected: 0.3.0, 0.3.1, 0.3.2, 0.3.3 (+63 more) | 0.9.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
- CWE-59
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.6 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2026-57571?
- Crawl4AI: Arbitrary file write (path traversal) in crawler downloads can lead to RCE. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.6/10).
- How do I check if my project is affected by CVE-2026-57571?
- CVE-2026-57571 affects crawl4ai. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-57571 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 53.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-56260CRITICAL
- CVE-2026-53753CRITICAL
Crawl4AI: AST Sandbox Escape via gi_frame.f_back Chain - Pre-Auth RCE in Docker API
- CVE-2026-57572CRITICAL
- CVE-2026-56260CRITICAL
Crawl4AI: Multiple Docker API Vulnerabilities - File Write, SSRF, Auth Bypass, XSS, JS Execution
- CVE-2026-26216CRITICAL
Crawl4AI is Vulnerable to Remote Code Execution in Docker API via Hooks Parameter
- CVE-2026-56260CRITICAL
Crawl4AI: authentication bypass vulnerability due to a hardcoded default JWT signing key in the Docker API server
- CVE-2026-53753CRITICAL
Crawl4AI: AST Sandbox Escape via gi_frame.f_back Chain - Pre-Auth RCE in Docker API
- CVE-2026-57572CRITICAL
Crawl4AI: Unauthenticated RCE via Chromium launch-argument injection in browser_config.extra_args