CVE-2026-56266: Crawl4AI Cross-Site Scripting Vulnerability

CRITICAL
Advisory Identifier: GHSA-365w-hqf6-vxfg
Advisory Summary

CVE-2026-56266 is a CRITICAL (CVSS 9.8) cross-site scripting vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Crawl4AI libraries in the PyPI ecosystem. The issue involves multiple docker api vulnerabilities - file write, ssrf, auth bypass, xss, js execution. Remediation is available by upgrading affected packages to version 0.8.7.

CVE-2026-56266 at a Glance

CVE Identifier CVE-2026-56266
GHSA Identifier GHSA-365w-hqf6-vxfg
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-798: Use of Hard-coded Credentials
Affected Product Crawl4AI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-56266

To remediate this vulnerability, upgrade all affected Crawl4AI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

crawl4ai fixed: 0.8.7
pip install crawl4ai>=0.8.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show crawl4ai

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-56266, inspect your installed packages using pip:

pip show crawl4ai

Analyze the terminal output to locate any version of Crawl4AI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.7), your application is affected.

Note: The pip show crawl4ai command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. In Crawl4AI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Multiple security vulnerabilities in the Crawl4AI Docker API server affecting endpoints for crawling, markdown/LLM extraction, screenshots, PDFs, webhooks, monitoring, JavaScript execution, and configuration. ### Vulnerabilities #### 1. Arbitrary File Write via /screenshot and /pdf (CWE-22, CVSS 9.1) The `output_path` parameter accepts arbitrary filesystem paths with no validation. An attacker can overwrite server files (DoS) or write to any appuser-writable location. **Fix:** Added `validate_output_path()` restricting writes to `CRAWL4AI_OUTPUT_DIR` (/tmp/crawl4ai-outputs by default). Added Pydantic `field_validator` rejecting `..` traversal sequences. #### 2. SSRF via Webhook URL (CWE-918, CVSS 8.6) Webhook URLs in `/crawl/job` and `/llm/job` accept internal/private IPs with no validation, enabling Server-Side Request Forgery against cloud metadata endpoints (169.254.169.254), internal services, and Docker networks. **Fix:** Added `validate_webhook_url()` with blocklist for RFC 1918, loopback, link-local, cloud metadata IPs and hostnames. Validation at both job submission and send time. Explicit `follow_redirects=False`. #### 3. Authentication Bypass on Monitor Endpoints (CWE-306, CVSS 6.5) The monitor router was mounted without `token_dep` dependency, making all monitoring endpoints (including destructive ones like `/monitor/actions/cleanup`) accessible without authentication. **Fix:** Added `dependencies=[Depends(token_dep)]` to monitor router. Added explicit token check on WebSocket `/monitor/ws` endpoint. #### 4. Stored XSS in Monitor Dashboard (CWE-79, CVSS 6.1) URLs and error messages rendered in the monitor dashboard via `innerHTML` without escaping, enabling stored XSS via crafted crawl URLs. **Fix:** Server-side `html.escape()` on URL and error storage. Client-side `escapeHtml()` wrapper on all `innerHTML` template injections. #### 5. Arbitrary JavaScript Execution via /execute_js (CWE-94, CVSS 8.1) The `/execute_js` endpoint accepts and executes arbitrary JavaScript in the server's browser with `--disable-web-security` enabled, combining arbitrary JS execution with SSRF capability. **Fix:** Disabled by default via `CRAWL4AI_EXECUTE_JS_ENABLED` env var. Added SSRF blocklist on destination URL. Removed `--disable-web-security` from default browser args. #### 6. Hardcoded JWT Secret Key (CWE-798, CVSS 9.8) The JWT signing key defaults to `"mysecret"` in the public source code, allowing anyone to forge valid authentication tokens. **Fix:** Removed default value. Added startup validation rejecting weak/short secrets. Auto-generates ephemeral key when JWT enabled but no key set. #### 7. SSRF via Direct Crawl Endpoints /crawl, /md, /llm (CWE-918, CVSS 8.6) The primary crawl entry points (`/crawl`, `/crawl/stream`, `/md`, `/llm`) fetch arbitrary user-supplied URLs with no destination validation, enabling Server-Side Request Forgery against internal services, Docker networks, and cloud metadata endpoints (169.254.169.254). A blocklist that only inspects the literal hostname is additionally bypassable via IPv6-mapped IPv4 addresses (e.g. `[::ffff:169.254.169.254]`, `[::ffff:10.0.0.1]`), which resolve to the blocked private/metadata ranges but evade a naive string check. **Fix:** Added URL destination validation on all crawl/md/llm entry points, reusing the SSRF blocklist (RFC 1918, loopback, link-local, cloud-metadata IPs and hostnames). IPv6-mapped IPv4 addresses are normalized to their IPv4 form before the blocklist check, closing the mapping bypass. `raw://` URLs are skipped. Validation applies at request entry, not only at fetch time. ### Workarounds 1. Upgrade to the patched version (recommended) 2. Set `CRAWL4AI_API_TOKEN` to enable authentication 3. Set a strong `SECRET_KEY` (min 32 chars) if using JWT 4. Restrict network access to the Docker API ### Credits - Jeongbean Jeon - file write, SSRF, monitor auth bypass, stored XSS - wulonchia - file write via output_path (independent report) - by111 ([August829](https://github.com/August829)) - hardcoded JWT, eval in /config/dump, /execute_js, hook sandbox escape - secsys_codex - SSRF via /md, /crawl, /llm endpoints + IPv6-mapped IPv4 bypass (URL destination validation) - Velayutham Selvaraj ([LinkedIn](https://www.linkedin.com/in/velayuthamselvaraj)) - SSRF via missing host validation in validate_url_scheme (independent report) - IcySun & Yashon - SSRF, arbitrary file write, missing-auth-by-default, hook sandbox bypass via asyncio (independent report)

CVE-2026-56266 Affected Crawl4AI Versions

1 component(s)
Fixed Versions:
0.8.7
Product / Package Ecosystem Affected Versions Fixed Version
crawl4ai
PyPI
< 0.8.7
0.8.7

References

GitHub Advisory / Wiki ADVISORY
https://github.com/unclecode/crawl4ai/security/advisories/GHSA-365w-hqf6-vxfg
NVD — CVE-2026-56266 NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-56266
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-unauthenticated-access-to-monitor-endpoints-via-docker-api-server
Crawl4AI Source Repository REPOSITORY
https://github.com/unclecode/crawl4ai
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-stored-cross-site-scripting-in-monitor-dashboard
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-server-side-request-forgery-via-webhook-urls
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-server-side-request-forgery-via-direct-crawl-endpoints
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-authentication-bypass-via-hardcoded-jwt-signing-key
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-arbitrary-javascript-execution-via-execute-js-endpoint
www.vulncheck.com/advisories/crawl4ai... WEB
https://www.vulncheck.com/advisories/crawl4ai-arbitrary-file-write-via-output-path-parameter
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-798.yaml
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-596.yaml
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-3449.yaml
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-3443.yaml
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-239.yaml
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-230.yaml
Crawl4AI Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-229.yaml
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-xrfj-6m49-wfmm
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-r9hw-78q5-478g
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-g2pv-76hm-j4x9
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-f23g-2f38-gg94
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-8qrg-7j2f-rf2h
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-53rg-46cm-4g2v

Frequently Asked Questions

What is CVE-2026-56266?
CVE-2026-56266 is a security vulnerability in Crawl4AI involving Multiple Docker API Vulnerabilities - File Write, SSRF, Auth Bypass, XSS, JS Execution under CWE-798: Use of Hard-coded Credentials.
Which Crawl4AI versions are affected?
Affected versions include releases prior to 0.8.7 across affected packages: crawl4ai.
What version fixes CVE-2026-56266?
Upgrading to 0.8.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is crawl4ai affected?
Yes, crawl4ai is affected in releases prior to 0.8.7. Upgrade your dependency to 0.8.7 or later.
What is the CVSS score of CVE-2026-56266?
CVE-2026-56266 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-56266?
CVE-2026-56266 is classified under CWE-798: Use of Hard-coded Credentials (The product contains hard-coded credentials, such as a password or cryptographic key.).
How can I check PyPI dependencies for CVE-2026-56266?
Run the dependency tree command: 'pip show crawl4ai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-365w-hqf6-vxfg",
  "modified" : "2026-09-23T21:03:22Z",
  "published" : "2026-06-16T20:13:30Z",
  "aliases" : [ "CVE-2026-56266" ],
  "summary" : "Crawl4AI: Multiple Docker API Vulnerabilities - File Write, SSRF, Auth Bypass, XSS, JS Execution",
  "details" : "### Summary\n\nMultiple security vulnerabilities in the Crawl4AI Docker API server affecting endpoints for crawling, markdown/LLM extraction, screenshots, PDFs, webhooks, monitoring, JavaScript execution, and configuration.\n\n### Vulnerabilities\n\n#### 1. Arbitrary File Write via /screenshot and /pdf (CWE-22, CVSS 9.1)\n\nThe `output_path` parameter accepts arbitrary filesystem paths with no validation. An attacker can overwrite server files (DoS) or write to any appuser-writable location.\n\n**Fix:** Added `validate_output_path()` restricting writes to `CRAWL4AI_OUTPUT_DIR` (/tmp/crawl4ai-outputs by default). Added Pydantic `field_validator` rejecting `..` traversal sequences.\n\n#### 2. SSRF via Webhook URL (CWE-918, CVSS 8.6)\n\nWebhook URLs in `/crawl/job` and `/llm/job` accept internal/private IPs with no validation, enabling Server-Side Request Forgery against cloud metadata endpoints (169.254.169.254), internal services, and Docker networks.\n\n**Fix:** Added `validate_webhook_url()` with blocklist for RFC 1918, loopback, link-local, cloud metadata IPs and hostnames. Validation at both job submission and send time. Explicit `follow_redirects=False`.\n\n#### 3. Authentication Bypass on Monitor Endpoints (CWE-306, CVSS 6.5)\n\nThe monitor router was mounted without `token_dep` dependency, making all monitoring endpoints (including destructive ones like `/monitor/actions/cleanup`) accessible without authentication.\n\n**Fix:** Added `dependencies=[Depends(token_dep)]` to monitor router. Added explicit token check on WebSocket `/monitor/ws` endpoint.\n\n#### 4. Stored XSS in Monitor Dashboard (CWE-79, CVSS 6.1)\n\nURLs and error messages rendered in the monitor dashboard via `innerHTML` without escaping, enabling stored XSS via crafted crawl URLs.\n\n**Fix:** Server-side `html.escape()` on URL and error storage. Client-side `escapeHtml()` wrapper on all `innerHTML` template injections.\n\n#### 5. Arbitrary JavaScript Execution via /execute_js (CWE-94, CVSS 8.1)\n\nThe `/execute_js` endpoint accepts and executes arbitrary JavaScript in the server's browser with `--disable-web-security` enabled, combining arbitrary JS execution with SSRF capability.\n\n**Fix:** Disabled by default via `CRAWL4AI_EXECUTE_JS_ENABLED` env var. Added SSRF blocklist on destination URL. Removed `--disable-web-security` from default browser args.\n\n#### 6. Hardcoded JWT Secret Key (CWE-798, CVSS 9.8)\n\nThe JWT signing key defaults to `\"mysecret\"` in the public source code, allowing anyone to forge valid authentication tokens.\n\n**Fix:** Removed default value. Added startup validation rejecting weak/short secrets. Auto-generates ephemeral key when JWT enabled but no key set.\n\n#### 7. SSRF via Direct Crawl Endpoints /crawl, /md, /llm (CWE-918, CVSS 8.6)\n\nThe primary crawl entry points (`/crawl`, `/crawl/stream`, `/md`, `/llm`) fetch arbitrary user-supplied URLs with no destination validation, enabling Server-Side Request Forgery against internal services, Docker networks, and cloud metadata endpoints (169.254.169.254). A blocklist that only inspects the literal hostname is additionally bypassable via IPv6-mapped IPv4 addresses (e.g. `[::ffff:169.254.169.254]`, `[::ffff:10.0.0.1]`), which resolve to the blocked private/metadata ranges but evade a naive string check.\n\n**Fix:** Added URL destination validation on all crawl/md/llm entry points, reusing the SSRF blocklist (RFC 1918, loopback, link-local, cloud-metadata IPs and hostnames). IPv6-mapped IPv4 addresses are normalized to their IPv4 form before the blocklist check, closing the mapping bypass. `raw://` URLs are skipped. Validation applies at request entry, not only at fetch time.\n\n### Workarounds\n\n1. Upgrade to the patched version (recommended)\n2. Set `CRAWL4AI_API_TOKEN` to enable authentication\n3. Set a strong `SECRET_KEY` (min 32 chars) if using JWT\n4. Restrict network access to the Docker API\n\n### Credits\n\n- Jeongbean Jeon - file write, SSRF, monitor auth bypass, stored XSS\n- wulonchia - file write via output_path (independent report)\n- by111 ([August829](https://github.com/August829)) - hardcoded JWT, eval in /config/dump, /execute_js, hook sandbox escape\n- secsys_codex - SSRF via /md, /crawl, /llm endpoints + IPv6-mapped IPv4 bypass (URL destination validation)\n- Velayutham Selvaraj ([LinkedIn](https://www.linkedin.com/in/velayuthamselvaraj)) - SSRF via missing host validation in validate_url_scheme (independent report)\n- IcySun & Yashon - SSRF, arbitrary file write, missing-auth-by-default, hook sandbox bypass via asyncio (independent report)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "crawl4ai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.6"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/unclecode/crawl4ai/security/advisories/GHSA-365w-hqf6-vxfg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-56266"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-unauthenticated-access-to-monitor-endpoints-via-docker-api-server"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-stored-cross-site-scripting-in-monitor-dashboard"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-server-side-request-forgery-via-webhook-urls"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-server-side-request-forgery-via-direct-crawl-endpoints"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-authentication-bypass-via-hardcoded-jwt-signing-key"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-arbitrary-javascript-execution-via-execute-js-endpoint"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/crawl4ai-arbitrary-file-write-via-output-path-parameter"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/unclecode/crawl4ai"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-798.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-596.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-3449.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-3443.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-239.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-230.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-229.yaml"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-xrfj-6m49-wfmm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-r9hw-78q5-478g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-g2pv-76hm-j4x9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-f23g-2f38-gg94"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-8qrg-7j2f-rf2h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-53rg-46cm-4g2v"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-306", "CWE-79", "CWE-798", "CWE-918", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-16T20:13:30Z",
    "nvd_published_at" : "2026-06-22T22:16:50Z"
  }
}