10.0critical
Crawl4AI < 0.8.0 Docker API Unauthenticated Remote Code Execution via Hooks Parameter
- Severity
- 10.0critical CVSS:4.0 by VulnCheck
- Exploit likelihood
- 6.33% (higher than 93% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-5882-5rx9-xgxpPYSEC-2026-33
Description
Crawl4AI versions prior to 0.8.0 contain a remote code execution vulnerability in the 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 unauthenticated remote attackers to import arbitrary modules and execute system commands. Successful exploitation allows full server compromise, including arbitrary command execution, file read and write access, sensitive data exfiltration, and lateral movement within internal networks.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| crawl4ai | before 0.8.0 | CVE List |
| crawl4ai (PyPI) | before 0.8.0 | GitHub Advisory Database, PyPA Advisory Database |
| kidocode crawl4ai | before 0.8.0 | NVD |
All scores
| VulnCheck | 10.0critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
| VulnCheck | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
| PyPA Advisory Database | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
Crawl4AI versions prior to 0.8.0 contain a remote code execution vulnerability in the 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 unauthenticated remote attackers to import arbitrary modules and execute system commands. Successful exploitation allows full server compromise, including arbitrary command execution, file read and write access, sensitive data exfiltration, and lateral movement within internal networks.
GitHub Advisory Database
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"
}
}
}
Impact
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
Mitigation
- Upgrade to v0.8.0 (recommended)
- If unable to upgrade immediately:
- Disable the Docker API
- Block
/crawlendpoint at network level - Add authentication to the API
Fix Details
- Removed
__import__fromallowed_builtinsinhook_manager.py - Hooks disabled by default (
CRAWL4AI_HOOKS_ENABLED=false) - Users must explicitly opt-in to enable hooks
Credits
Discovered by Neo by ProjectDiscovery (https://projectdiscovery.io)
NVD (es)
Las versiones de Crawl4AI anteriores a la 0.8.0 contienen una vulnerabilidad de ejecución remota de código en el despliegue de la API de Docker. El endpoint /crawl acepta un parámetro hooks que contiene código Python que se ejecuta usando exec(). La función incorporada __import__ se incluyó en las funciones incorporadas permitidas, lo que permite a atacantes remotos no autenticados importar módulos arbitrarios y ejecutar comandos del sistema. La explotación exitosa permite el compromiso total del servidor, incluyendo la ejecución arbitraria de comandos, acceso de lectura y escritura de archivos, exfiltración de datos sensibles y movimiento lateral dentro de redes internas.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26216 changed 2026-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5882-5rx9-xgxp changed 2026-06-05 | CC-BY-4.0 |
| NVD | CVE-2026-26216 changed 2026-10-08 | Public domain |
| PyPA Advisory Database | PYSEC-2026-33 changed 2026-05-20 | CC-BY-4.0 |