CVE-2026-91940: crawl4ai before 0.9.3 Arbitrary File Write via PDFContentScrapingStrategy
crawl4ai before 0.9.3 contains an arbitrary file write vulnerability in PDFContentScrapingStrategy where the filteruntrustedfields function fails to validate untrusted configuration fields. Attackers can submit crafted config bodies with malicious imagesavedir paths to write attacker-controlled bytes into any directory accessible to the service account.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
crawl4aito a version that resolves this vulnerability.Fixed in 0.9.3 - Compensating control
Until upgraded, restrict filesystem permissions so the service account cannot write to arbitrary directories via the image_save_dir path.
Event History
Frequently Asked Questions
Who is exposed to this issue?
Crawl4AI deployments running a version before 0.9.3 are affected where an attacker can submit configuration bodies that reach PDFContentScrapingStrategy. The impact is limited by the filesystem permissions of the service account.
What does an attacker need to exploit it?
An attacker needs the ability to submit a crafted configuration body containing a malicious image_save_dir path. No privileges or user interaction are required according to the supplied severity vector.
What can happen if exploitation succeeds?
The attacker can write attacker-controlled bytes to arbitrary directories that are accessible to the Crawl4AI service account. This can affect integrity, while the provided vector does not indicate confidentiality or availability impact.
What is the immediate mitigation if upgrading is not possible?
Restrict who can submit configuration bodies that invoke PDFContentScrapingStrategy, and run the service under an account with minimal filesystem write permissions. Prevent writable access to sensitive application, system, and deployment directories.