Critical Remote Code Execution Vulnerability in Crawl4AI Package
Summary
GHSA-5882-5rx9-xgxp: Crawl4AI is Vulnerable to Remote Code Execution in Docker API via Hooks Parameter. Affects crawl4ai versions < 0.8.0. Fixed in 0.8.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Crawl4AI is an open-source tool designed for web crawling and data extraction, leveraging Docker for deployment. It allows users to define custom hooks for processing web pages during the crawling process. However, a critical vulnerability has been identified in its Docker API deployment, specifically in the handling of the 'hooks' parameter, which can lead to severe security risks.
Vulnerability Detail
A critical remote code execution vulnerability exists in the Crawl4AI Docker API deployment. The '/crawl' endpoint accepts a 'hooks' parameter containing Python code that is executed using 'exec()'. The inclusion of the 'import' builtin in the allowed builtins enables attackers to import arbitrary modules and execute system commands. This vulnerability allows unauthenticated attackers to execute arbitrary system commands, read/write files on the server, exfiltrate sensitive data, pivot to internal network services, and potentially compromise the entire server.
How To Fix
Latest published version: 0.9.5 as of 23 Oct 2026
pip install --upgrade "crawl4ai==0.9.5"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.8.0
This is the first release that contains the fix.
pip install --upgrade "crawl4ai==0.8.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If immediate upgrading is not feasible, consider implementing the following workarounds: 1. Disable the Docker API. 2. Block the '/crawl' endpoint at the network level. 3. Add authentication to the API to restrict access.
Conclusion
The Crawl4AI package has a critical vulnerability that allows remote code execution through its Docker API. Immediate action is required to upgrade to the patched version or implement workarounds to mitigate the risk. Users should remain vigilant and monitor their applications for potential vulnerabilities.
See every vulnerability recorded for crawl4ai →
FAQ
The CVSS score of this vulnerability is 10.0, indicating a critical severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected without any signup.
An attacker can execute arbitrary commands, read/write files, exfiltrate sensitive data, and potentially compromise the server.
Yes, you can disable the Docker API, block the '/crawl' endpoint, or add authentication to the API as temporary measures.
This vulnerability was discovered by Neo from ProjectDiscovery.
References
Related vulnerabilities
Recent vulnerabilities recorded for crawl4ai.