ZeroHour

CVE-2026-91940

moderate

Arbitrary File Write in crawl4ai PDF Scraping Strategy via Untrusted Config Paths

CVSS 4.0
8.7 high
EPSS
Published
()
Modified
AI analysis

crawl4ai before 0.9.3 contains a path traversal / arbitrary file write flaw (CWE-22) in its PDFContentScrapingStrategy, where the _filter_untrusted_fields function fails to validate untrusted fields in submitted crawl configurations. An attacker supplies a crafted config body containing a malicious image_save_dir path, causing the service to write attacker-controlled bytes into any directory writable by the service account. Because the vector is network-reachable with no authentication, privileges, or user interaction required (CVSS 4.0: 8.7), any deployment that accepts crawl configurations from untrusted clients — such as publicly exposed crawl4ai API/server instances — is at risk of integrity compromise, including potential overwriting of application files or writing files that lead to further compromise. Users of the library who only process their own trusted configs are not directly exposed. No public proof of concept exists and the issue is not in the CISA KEV catalog, so exploitation is not known to be occurring in the wild.

What to do: Upgrade crawl4ai to version 0.9.3 or later, which validates untrusted configuration fields in PDFContentScrapingStrategy. If immediate upgrade is not possible, do not expose crawl4ai server/API endpoints to untrusted networks or users, and reject or sanitize path-bearing config fields such as image_save_dir. Additionally, run the service under a dedicated low-privilege account or container with a read-only filesystem except for designated scratch directories, and inspect existing deployments for unexpected files written outside expected output paths.

Affected
unclecode crawl4aibefore 0.9.3
Estimated exposure
moderatelikely 1,000s–10,000s of internet-reachable crawl4ai services, out of a larger installed base of the library (roughly 100,000s of project installations) — crawl4ai is a popular open-source Python library with substantial PyPI download volume and an officially supported Docker/server deployment pattern, but only instances that accept user-supplied crawl configurations over a network are…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

crawl4ai before 0.9.3 contains an arbitrary file write vulnerability in PDFContentScrapingStrategy where the _filter_untrusted_fields function fails to validate untrusted configuration fields. Attackers can submit crafted config bodies with malicious image_save_dir paths to write attacker-controlled bytes into any directory accessible to the service account.

Weakness
CWE-22
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.