{
  "credits": [],
  "cve_id": "CVE-2026-26216",
  "cvss": {
    "score": null,
    "vector_string": null
  },
  "cvss_severities": {
    "cvss_v3": {
      "score": 0.0,
      "vector_string": null
    },
    "cvss_v4": {
      "score": 10.0,
      "vector_string": "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"
    }
  },
  "cwes": [
    {
      "cwe_id": "CWE-94",
      "name": "Improper Control of Generation of Code ('Code Injection')"
    }
  ],
  "description": "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)",
  "epss": {
    "percentage": 0.00265,
    "percentile": 0.49659
  },
  "ghsa_id": "GHSA-5882-5rx9-xgxp",
  "github_reviewed_at": "2026-01-16T20:59:16Z",
  "html_url": "https://github.com/advisories/GHSA-5882-5rx9-xgxp",
  "identifiers": [
    {
      "type": "GHSA",
      "value": "GHSA-5882-5rx9-xgxp"
    },
    {
      "type": "CVE",
      "value": "CVE-2026-26216"
    }
  ],
  "nvd_published_at": "2026-02-12T16:16:17Z",
  "published_at": "2026-01-16T20:59:16Z",
  "references": [
    "https://github.com/unclecode/crawl4ai/security/advisories/GHSA-5882-5rx9-xgxp",
    "https://github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/blog/release-v0.8.0.md",
    "https://github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/migration/v0.8.0-upgrade-guide.md",
    "https://nvd.nist.gov/vuln/detail/CVE-2026-26216",
    "https://github.com/unclecode/crawl4ai/blob/main/docs/blog/release-v0.8.0.md",
    "https://www.vulncheck.com/advisories/crawl4ai-docker-api-unauthenticated-remote-code-execution-via-hooks-parameter",
    "https://github.com/advisories/GHSA-5882-5rx9-xgxp"
  ],
  "repository_advisory_url": "https://api.github.com/repos/unclecode/crawl4ai/security-advisories/GHSA-5882-5rx9-xgxp",
  "severity": "critical",
  "source_code_location": "https://github.com/unclecode/crawl4ai",
  "summary": "Crawl4AI is Vulnerable to Remote Code Execution in Docker API via Hooks Parameter",
  "type": "reviewed",
  "updated_at": "2026-02-12T20:09:30Z",
  "url": "https://api.github.com/advisories/GHSA-5882-5rx9-xgxp",
  "vulnerabilities": [
    {
      "first_patched_version": "0.8.0",
      "package": {
        "ecosystem": "pip",
        "name": "Crawl4AI"
      },
      "vulnerable_functions": [],
      "vulnerable_version_range": "< 0.8.0"
    }
  ],
  "withdrawn_at": null
}