Skip to content
CriticalVulnerability

GHSA-2jq4-q6vv-4cp3: Crawl4AI: Arbitrary file write (path traversal) in crawler downloads can lead to RCE

Published
Record updated
View JSON
Affected
  • crawl4ai <= 0.8.9
Fixed in
0.9.0
  • released June 18, 2026, on the day of disclosure

Summary

Crawl4AI's crawler saved downloaded files using an attacker-influenced destination filename joined to the downloads directory with no confinement, in the HTTP strategy's Content-Disposition handling (_extract_filename()) and the Playwright strategy's suggested_filename. Crafted names with absolute paths or ../ traversal allow arbitrary file writes with attacker-controlled contents, which can escalate to remote code execution. The HTTP sink is reachable pre-auth on the default Docker deployment.

Mitigation

Fixed by resolving destinations through a hardened helper (_safe_download_filepath) that reduces names to a bare basename and checks via realpath that the path stays within the downloads root. Workarounds: upgrade to version 0.9.0, run the crawler as an unprivileged user with an isolated downloads directory, and enable authentication via CRAWL4AI_API_TOKEN on the Docker server.