PyPI: crawl4ai

GHSA-2jq4-q6vv-4cp3

Safety vulnerability ID: SFTY-20260618-06125

Affected versions of the Crawl4AI package are vulnerable to Path Traversal due to improper handling of filenames derived from attacker-influenced input. The `AsyncHTTPCrawlerStrategy` and `AsyncPlaywrightCrawlerStrategy` in `crawl4ai/async_crawler_strategy.py` fail to sanitize filenames extracted from the `Content-Disposition` header and `suggested_filename`, respectively, allowing traversal outside the intended downloads directory. An attacker can exploit this by crafting filenames with absolute paths or `../` sequences, enabling arbitrary file writes with controlled content, potentially leading to Remote Code Execution by overwriting critical system files or scripts.

Created at: Jun 19, 2026Updated at: Jun 19, 2026

Overview

Crawl4AI: Arbitrary file write (path traversal) in crawler downloads can lead to RCE

Advisory

Crawl4AI – Path Traversal

Affected Package

Affecting crawl4ai package, versions
<= 0.8.9

Also affects

---

How to Fix

Upgrade
crawl4ai
to
0.9.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more