CVE-2026-26216
Remote Code Execution in Crawl4AI Docker API Prior to
Publication date: 2026-02-12
Last updated on: 2026-02-20
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| kidocode | crawl4ai | to 0.8.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-26216 is a critical remote code execution vulnerability in Crawl4AI versions prior to 0.8.0. It exists in the Docker API deployment, specifically in the /crawl endpoint, which accepts a hooks parameter containing Python code executed via the exec() function.
The vulnerability arises because the __import__ builtin function is included in the allowed builtins, allowing unauthenticated remote attackers to import arbitrary Python modules and execute system commands without any authentication.
This flaw enables attackers to execute arbitrary commands, read and write files, exfiltrate sensitive data, and move laterally within internal networks, leading to full server compromise.
How can this vulnerability impact me? :
Successful exploitation of this vulnerability allows an attacker to fully compromise the affected server.
- Execute arbitrary system commands remotely without authentication.
- Read and write files on the server, potentially modifying or stealing data.
- Exfiltrate sensitive information such as environment variables and API keys.
- Perform lateral movement within internal networks to compromise additional systems.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability can be detected by monitoring for unauthorized or suspicious POST requests to the /crawl endpoint of the Crawl4AI Docker API deployment. Specifically, look for requests containing the hooks parameter with embedded Python code, which may include usage of the __import__ builtin or system command executions.'}, {'type': 'paragraph', 'content': 'A practical detection method is to inspect network traffic or server logs for POST requests similar to the following payload pattern:'}, {'type': 'list_item', 'content': 'POST /crawl with JSON body containing a hooks parameter with Python code, e.g., { "hooks": { "code": { "on_page_context_created": "async def hook(page, context, **kwargs):\\n __import__(\'os\').system(\'malicious_command\')\\n return page" } } }'}, {'type': 'paragraph', 'content': 'Commands to detect such activity might include searching server access logs for POST requests to /crawl or scanning for suspicious payloads containing __import__ or exec usage.'}, {'type': 'list_item', 'content': "Example command to search logs: grep -i 'POST /crawl' /var/log/nginx/access.log | grep -i '__import__'"}, {'type': 'list_item', 'content': 'Network monitoring tools or intrusion detection systems can be configured to alert on HTTP POST requests to /crawl containing suspicious Python code patterns.'}] [2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include upgrading Crawl4AI to version 0.8.0 or later, where the vulnerability is fixed by removing the __import__ builtin from allowed builtins and disabling hooks by default.
- Upgrade Crawl4AI to version 0.8.0 or newer.
- Disable hooks by setting the environment variable CRAWL4AI_HOOKS_ENABLED=false to prevent execution of arbitrary code.
- Temporarily disable the Docker API if possible to prevent exploitation.
- Block access to the /crawl endpoint at the network level using firewall rules or reverse proxy configurations.
- Add authentication mechanisms to the API to restrict access.