Summary
CVE-2026-91940 is an arbitrary file write vulnerability in Crawl4AI, an open-source LLM-friendly web crawling and scraping framework, caused by insufficient validation of untrusted configuration fields in its PDFContentScrapingStrategy component. A remote, unauthenticated attacker can submit a crafted crawl configuration to write attacker-controlled bytes to arbitrary directories accessible to the service account. The flaw carries a CVSS score of 8.7 (High).
Technical details
- Root cause: the
_filter_untrusted_fieldsfunction (inasync_configs.py) is meant to strip disallowed fields from untrusted, client-supplied configuration bodies, but it fails open for any type that has no entry in its allowlist.PDFContentScrapingStrategyhas no such allowlist entry despite being reachable via untrusted requests. - As a result, fields including
image_save_dirpass through unfiltered, and the PDF/image writer performs no path containment (no realpath/canonicalization check) before writing extracted content to disk. - Trigger conditions: an attacker submits a crawl/scrape request whose configuration body specifies
PDFContentScrapingStrategywith a craftedimage_save_dir, pointing the target URL at a PDF the attacker controls (self-hosted or otherwise reachable). - Attack vector: Network — no authentication or user interaction is required to reach the vulnerable code path via the crawler’s configuration/API interface.
- Impact: arbitrary file write with attacker-controlled content into any directory writable by the application’s service account, which can lead to configuration tampering, planting of malicious files, or further compromise depending on what the service account can write to. No confidentiality or availability impact and no demonstrated direct code-execution path is documented in the advisory.
Affected software
- Crawl4AI (PyPI package
crawl4ai, vendorunclecode): versions 0.9.0 up to (but not including) 0.9.3 - Fixed in version 0.9.3 and later
Severity
- CVSS v4.0 Base Score: 8.7 (High)
- 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 - (CVSS v3.1 equivalent also published: 7.5,
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N)
Mitigation and recommended actions
- Immediate: upgrade Crawl4AI to version 0.9.3 or later, which fixes the field-filtering logic for
PDFContentScrapingStrategy. - If patching is not immediately possible:
- Disable or restrict use of
PDFContentScrapingStrategyin exposed crawl configurations. - Do not accept crawl/scrape configuration bodies from untrusted or unauthenticated clients; place an authentication layer in front of any exposed Crawl4AI API/Docker server.
- Run the crawler service under a restricted, non-privileged account with write access limited to a dedicated, isolated directory to constrain the impact of any unauthorized file write.
- Monitor for unexpected files written outside expected output directories.
- Disable or restrict use of

