{"id":"CVE-2026-26216","aliases":["CVE-2026-26216","GHSA-5882-5rx9-xgxp","PYSEC-2026-33"],"related":[],"kind":"vulnerability","state":"published","title":"Crawl4AI < 0.8.0 Docker API Unauthenticated Remote Code Execution via Hooks Parameter","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\n**Attack Vector:**\n```json\nPOST /crawl\n{\n  \"urls\": [\"https://example.com\"],\n  \"hooks\": {\n    \"code\": {\n      \"on_page_context_created\": \"async def hook(page, context, **kwargs):\\n    __import__('os').system('malicious_command')\\n    return page\"\n    }\n  }\n}\n```\n\n### Impact\n\nAn unauthenticated attacker can:\n- Execute arbitrary system commands\n- Read/write files on the server\n- Exfiltrate sensitive data (environment variables, API keys)\n- Pivot to internal network services\n- Completely compromise the server\n\n### Mitigation\n\n1. **Upgrade to v0.8.0** (recommended)\n2. If unable to upgrade immediately:\n   - Disable the Docker API\n   - Block `/crawl` endpoint at network level\n   - Add authentication to the API\n\n### Fix Details\n\n1. Removed `__import__` from `allowed_builtins` in `hook_manager.py`\n2. Hooks disabled by default (`CRAWL4AI_HOOKS_ENABLED=false`)\n3. Users must explicitly opt-in to enable hooks\n\n### Credits\n\nDiscovered by Neo by ProjectDiscovery (https://projectdiscovery.io)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-01-16T20:59:16.000Z","modified":"2026-11-08T14:01:31.976Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":10,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.8.0","status":"affected"}],"vendor":"unclecode","product":"Crawl4AI","package":"crawl4ai","repo":"https://github.com/unclecode/crawl4ai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.8.0"}],"ecosystem":"PyPI","package":"crawl4ai","purl":"pkg:pypi/crawl4ai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.8.0"}],"vendor":"kidocode","product":"crawl4ai","cpe":"cpe:2.3:a:kidocode:crawl4ai:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.8.0"}],"ecosystem":"PyPI","package":"crawl4ai","purl":"pkg:pypi/crawl4ai","source":"pysec"}],"references":[{"url":"https://github.com/unclecode/crawl4ai/security/advisories/GHSA-5882-5rx9-xgxp","tags":["advisory","mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/unclecode/crawl4ai/blob/main/docs/blog/release-v0.8.0.md","tags":["advisory","release-notes","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/crawl4ai-docker-api-unauthenticated-remote-code-execution-via-hooks-parameter","tags":["advisory","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26216","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-33.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/unclecode/crawl4ai","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/blog/release-v0.8.0.md","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/migration/v0.8.0-upgrade-guide.md","tags":["web"],"sources":["ghsa"]}],"credits":["Neo by ProjectDiscovery (https://neo.projectdiscovery.io)"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-02-12T21:01:07.012Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-26216","url":"https://www.cve.org/CVERecord?id=CVE-2026-26216","licence":"CVE Terms of Use","modified":"2026-11-08T14:01:31.976Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5882-5rx9-xgxp","url":"https://github.com/advisories/GHSA-5882-5rx9-xgxp","licence":"CC-BY-4.0","modified":"2026-06-05T16:30:07.832Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-26216","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26216","licence":"Public domain","modified":"2026-10-08T16:17:11.920Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-33","url":"https://osv.dev/vulnerability/PYSEC-2026-33","licence":"CC-BY-4.0","modified":"2026-05-20T09:18:55.751Z"}],"updatedAt":"2026-11-25T22:59:13.822Z","epss":{"score":0.06326,"percentile":0.93769,"date":"2026-12-01T12:00:22.000Z"}}