CVE-2026-26216
JSON

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 packageVersionsReported by
crawl4aibefore 0.8.0CVE List
crawl4ai (PyPI)before 0.8.0GitHub Advisory Database, PyPA Advisory Database
kidocode crawl4aibefore 0.8.0NVD

All scores

VulnCheck10.0critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
VulnCheck10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS: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 Database10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-94

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
  1. Upgrade to v0.8.0 (recommended)
  2. If unable to upgrade immediately:
    • Disable the Docker API
    • Block /crawl endpoint at network level
    • Add authentication to the API
Fix Details
  1. Removed __import__ from allowed_builtins in hook_manager.py
  2. Hooks disabled by default (CRAWL4AI_HOOKS_ENABLED=false)
  3. 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

SourceRecordLicence
CVE ListCVE-2026-26216 changed 2026-11-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-5882-5rx9-xgxp changed 2026-06-05CC-BY-4.0
NVDCVE-2026-26216 changed 2026-10-08Public domain
PyPA Advisory DatabasePYSEC-2026-33 changed 2026-05-20CC-BY-4.0