Skip to content
Threat Feed
high advisory

Arbitrary File Write Vulnerability in crawl4ai PDFContentScrapingStrategy

The PDFContentScrapingStrategy in crawl4ai versions prior to 0.9.3 is vulnerable to arbitrary file write via insufficient input validation in the _filter_untrusted_fields function, allowing attackers to overwrite sensitive files.

CVE search metadata

CVE search record: CVE-2026-91940. Severity: high. CVSS: 7.5. KEV: no. Product: crawl4ai (< 0.9.3). Brief: Arbitrary File Write Vulnerability in crawl4ai PDFContentScrapingStrategy. Brief link: https://feed.craftedsignal.io/briefs/2026-09-cve-2026-91940/

What's new

  • 1. added coverage for Crawl4AI (< 0.9.3) Sep 15, 19:42 via nvd

The crawl4ai library, specifically in versions prior to 0.9.3, contains an arbitrary file write vulnerability within the PDFContentScrapingStrategy component. The root cause is a failure in the _filter_untrusted_fields function to correctly validate configuration parameters provided during the PDF scraping process. An attacker can craft a malicious configuration body containing a manipulated image_save_dir path. By exploiting this, an attacker can coerce the library to write arbitrary data to locations on the host file system that are accessible to the process running the crawl4ai service. This vulnerability enables attackers to potentially overwrite configuration files, inject malicious scripts, or gain persistence by writing files into sensitive system or application directories, depending on the privileges of the service account.

Impact

Successful exploitation allows an unauthenticated or remote attacker to perform arbitrary file writes, potentially leading to remote code execution (RCE) by overwriting executable files or configuration files used by the application or OS. The impact is critical for environments where the crawl4ai library runs with elevated privileges or on sensitive servers.

Recommendation

  • Upgrade crawl4ai to version 0.9.3 or later immediately to patch CVE-2026-91940.
  • Run the crawl4ai service under a dedicated, non-privileged service account with restricted file system permissions to limit the impact of potential arbitrary file write exploits.
  • Audit logs for unexpected process activity initiated by the crawl4ai service account, particularly file creation or modification events in directories outside of expected output paths.

Threat Hunt

Identify file write events performed by processes associated with crawl4ai

T1068 medium medium confidence defer

Data: File integrity monitoring or process-related file event logs

Mitigations

Upgrade crawl4ai to version 0.9.3 or later

immediate IT Operations

CVE-2026-91940