Junglewise Threat Intelligence

CVE-2026-91944: crawl4ai DOM-based XSS in Playground UI

CVE-2026-91944 · Severity: medium · CVSS 6.1 · Published 2026-09-15

Executive brief

crawl4ai is a web scraping library that includes a Docker-based Playground UI for operators to test page crawling. A DOM-based cross-site scripting (XSS) vulnerability in the Playground allows attackers to inject malicious code through crawled page content (such as page titles), which executes in the operator's browser session. An attacker can exploit this to steal the operator's API token from browser storage, potentially gaining full control of the crawl4ai server.

Technical details

The vulnerability is a DOM-based XSS (CWE-79) in the Playground UI's forceHighlightElement() function (deploy/docker/static/playground/index.html, lines 972–988). The function retrieves textContent from an element containing stringified JSON response data and writes it back to innerHTML, causing the browser to re-parse and execute any embedded HTML/JavaScript. The attack vector leverages the fact that JSON.stringify() does not escape HTML special characters, and attacker-controlled content from crawled pages (e.g., page titles) survives this round-trip and executes as JavaScript. No Content Security Policy is enforced on the Playground UI endpoints, allowing inline script execution. The operator's API token is stored in sessionStorage (JavaScript-readable), enabling token theft via fetch exfiltration. The vulnerability affects crawl4ai versions before 0.9.3 and is patched in version 0.9.3 and later.

Affected products

  • crawl4ai crawl4ai < 0.9.3

Timeline

  • 2026-08-31: disclosed
  • 2026-09-15: advisory
  • 2026: patched: Version 0.9.3

References