Loading advisory.
Loading advisory.
Crawl4AI is Vulnerable to Remote Code Execution in Docker API via Hooks Parameter
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().
Published 2026-01-16 20:59 UTC · Modified 2026-11-08 14:01 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| crawl4ai | PyPI | < 0.8.0 versions 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.71, 0.3.72, 0.3.73, 0.3.731, 0.3.74, 0.3.741, 0.3.742, 0.3.743, 0.3.744, 0.3.745, 0.3.746, 0.3.8 and 41 more | 0.8.0 | pip install --upgrade 'crawl4ai>=0.8.0' |
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 __import__ builtin was included in the allowed builtins, allowing attackers to import arbitrary modules and execute system commands.
Attack Vector:
POST /crawl
{
"urls": ["https://example.com"],
"hooks": {
"code": {
"on_page_context_created": "async def hook(page, context, **kwargs):\n __import__('os').system('malicious_command')\n return page"
}
}
}An unauthenticated attacker can:
Execute arbitrary system commands
Read/write files on the server
Exfiltrate sensitive data (environment variables, API keys)
Pivot to internal network services
Completely compromise the server
Upgrade to v0.8.0 (recommended)
If unable to upgrade immediately:
Disable the Docker API
Block /crawl endpoint at network level
Add authentication to the API
Removed __import__ from allowed_builtins in hook_manager.py
Hooks disabled by default (CRAWL4AI_HOOKS_ENABLED=false)
Users must explicitly opt-in to enable hooks
Discovered by Neo by ProjectDiscovery (https://projectdiscovery.io)
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.063 on 2026-11-24 to 0.064 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.063 | first score | v2026.06.15 |
| 2026-11-26 | 0.064 | 0.063 | v2026.06.15 |