You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Security: unclecode/crawl4ai
Security
SECURITY.md
Security Policy
Supported Versions
Version
Supported
0.9.x
✅
0.8.x
❌ (upgrade recommended)
0.7.x
❌ (upgrade recommended)
< 0.7
❌
Fixes are not backported to earlier lines. The 0.9.3 advisories listed below are not patched in any 0.8.x release; if you run 0.8.x, upgrade.
Reporting a Vulnerability
We take security vulnerabilities seriously. If you discover a security issue, please report it responsibly.
How to Report
DO NOT open a public GitHub issue for security vulnerabilities.
# Set a strong secret keyexport SECRET_KEY="your-secure-random-key-here"
Hooks are Declarative (v0.9.0+)
Request-supplied hook code is no longer accepted; only the fixed action set in GET /hooks/info
On 0.8.x, hooks are disabled by default; set CRAWL4AI_HOOKS_ENABLED=true only if you trust all API users
Network Security
Run behind a reverse proxy (nginx, traefik)
Use HTTPS in production
Restrict access to trusted IPs if possible
Container Security
Run as non-root user (default in our container)
Use read-only filesystem where possible
Limit container resources
Library Usage
When using Crawl4AI as a Python library:
Validate URLs before crawling untrusted input
Sanitize extracted content before using in other systems
Be cautious with hooks - they execute arbitrary code
Known Security Issues
All issues below are fixed in the version named. Advisories with a GHSA id are published under Security Advisories. Full detail for every release is in CHANGELOG.md; reporter credits are in SECURITY-CREDITS.md.
Fixed in v0.9.6 (2026-11-20)
ID
Severity
Component
Description
Fix
GHSA-qwxw-87g2-26vm
MEDIUM
Library + Docker API
SSRF via URL userinfo in the TLS certificate fetch bypasses the egress check (CWE-918)
Fetch dials the real host, through the egress proxy
GHSA-9xxj-3r64-qw54
MEDIUM
Docker API
One browser context shared between API clients, leaking cookies and site storage (CWE-488)
Each caller gets its own context; browser_mode refused from untrusted bodies
GHSA-8696-2734-9jqw
MEDIUM
Docker API
ReDoS gate bypass via list-form schema field type (incomplete fix of GHSA-j843-8p47-rhxp) (CWE-1333)
List-form types with a regex step refused from untrusted bodies
GHSA-phmg-6873-j3gj
HIGH
Library + Docker image
Vulnerable Brotli decoder (CVE-2026-111497) allowed by the dependency range and shipped in the Docker image (CWE-787)
Floors raised to brotli>=1.2.1, playwright>=1.64.1, patchright>=1.64.2
GHSA-jfhw-vrxg-wpcw
MEDIUM
Docker API
Memory exhaustion via unchecked DefaultMarkdownGenerator options in untrusted bodies (CWE-915)
Untrusted bodies may set only known boolean options and body_width (max 10,000)
GHSA-8x85-mx8f-wj4v
MEDIUM
Library
Unbounded sitemap index following in AsyncUrlSeeder: cycles, depth, gzip bombs (CWE-674)
Each sitemap followed once; max 5 levels, 10,000 files, 50 MB raw and inflated
GHSA-x4gh-gvcx-p9gp
MEDIUM
Docker API
One caller's declarative hooks kept on the pooled crawler for later callers (CWE-668)
Received bytes counted; 413 past limits.max_body_bytes
GHSA-363x-fqh9-cvp2
MEDIUM
Docker API
fetch_ssl_certificate blocked the event loop (CWE-400)
Fetch runs in a thread
GHSA-2prc-jrcf-ccrm
LOW
Docker API
Rejected /crawl requests stayed in the active-request monitor forever (CWE-401)
Records end on every exit; monitor reads admin-only
GHSA-7628-8pmq-4xhq
MEDIUM
Docker API
Unbounded screenshot_wait_for let 40 requests hold every browser page (CWE-770)
Capped at 60 seconds; /screenshot uses the untrusted loader
Fixed in v0.9.5 (2026-10-14)
ID
Severity
Component
Description
Fix
GHSA-w4xc-px5p-c32w
MEDIUM
Library + Docker API
Blind SSRF via the cache freshness check in CacheValidator.validate, outside the egress proxy (CWE-918)
Fetch routed through the pinning egress proxy
GHSA-qj46-wp7m-rgj8
MEDIUM
Docker API
Page JavaScript injection via untrusted css_selector and wait_for (CWE-95)
css_selector passed to evaluate() as an argument; JavaScript wait_for refused for untrusted bodies
GHSA-f856-7xp9-w3cc
HIGH
Docker API
Untrusted CosineStrategy.model_name picks the HuggingFace model the server loads; code execution with PyTorch < 2.6 (CWE-502)
model_name refused from untrusted bodies
GHSA-j843-8p47-rhxp
MEDIUM
Docker API
ReDoS via caller-supplied regex patterns freezes the server (CWE-1333)
RegexExtractionStrategy.custom, RegexChunking.patterns, and schema regex fields refused from untrusted bodies
GHSA-rhjm-7hj7-75fx
MEDIUM
Docker API
Unbounded delay_before_return_html, mean_delay, max_range in untrusted bodies (CWE-770)
Capped at 60 seconds
GHSA-j2qh-f73r-mg3q
MEDIUM
Library + Docker API
Chromium launched with --ignore-certificate-errors, so TLS verification was off; sandbox opt-in ignored (CWE-295)
Flag removed; insecure mode only from ignore_https_errors; CRAWL4AI_CHROMIUM_SANDBOX reaches every browser
Fixed in v0.9.4 (2026-09-23)
ID
Severity
Component
Description
Fix
GHSA-f77g-77vp-r96v
MEDIUM
Library + Docker API
Blind SSRF via the robots.txt fetch in RobotsParser.can_fetch, outside the egress controls; redirects followed, DNS re-resolved (CWE-918)
Fetch routed through the pinning egress proxy; TLS verification restored
GHSA-wh5w-hmj3-vgg7
HIGH
Library + Docker API
SSRF with response disclosure via link_preview_config: the URL seeder fetched every link outside the egress controls and returned the parsed <head> (CWE-918)
Seeder fetches routed through the pinning egress proxy; LinkPreviewConfig caps max_links, concurrency, timeout for untrusted bodies
GHSA-5w5p-vcv6-mm3f
HIGH
Docker API
Untrusted-config gate bypass via {"type": "dict"} wrapper laundering, leaking server env vars such as LLM keys and SECRET_KEY (CWE-501)
Unwrapped value re-checked under the untrusted gate; from_kwargs carries the caller's provenance
Fixed in v0.9.3 (2026-08-31)
ID
Severity
Component
Description
Fix
GHSA-xpp7-j28w-2gvx
HIGH
Library + Docker API
Arbitrary file write via PDFContentScrapingStrategy image-write fields in untrusted config bodies (CWE-22)
save_images_locally / image_save_dir filtered at the trust boundary; extract_images forced off for untrusted bodies
GHSA-q5rj-45vw-vp2g
HIGH
Library
SSRF via PDF download redirects; DNS rebinding (CWE-918)
Redirects resolved manually with a per-hop destination check (max 5 hops); peer IP of the read response validated
GHSA-v2rm-hvrj-2x9q
MEDIUM
Library
Denial of service via unbounded PDF size and page count (CWE-400)
max_pdf_bytes (100 MiB) and max_pdf_pages (2000) caps; untrusted bodies cannot raise them
GHSA-7g3g-vhm6-79f3
MEDIUM
Library
XSS via unescaped PDF paragraph text in cleaned_html (CWE-79)
Paragraph text escaped like every other sink
GHSA-m446-hp3q-qfxp
HIGH
Docker Playground
DOM-based XSS via innerHTML round-trip in the result viewer, leading to API token theft (CWE-79)
Round-trip removed; highlight.js renders from textContent
Fixed in v0.9.2 (2026-07-15)
ID
Severity
Component
Description
Fix
-
LOW
Docker API
/monitor/ws WebSocket returned 500 under JWT auth because the router-level token dependency cannot run on WebSocket scopes
Auth enforced by AuthGateMiddleware; admin routes keep require_admin
Fixed in v0.9.1 (2026-07-08)
ID
Severity
Component
Description
Fix
-
MEDIUM
Docker API
Rate-limit Redis storage connected without the configured password
Rate limiter authenticates to Redis
Fixed in v0.9.0 (2026-06-18)
Secure-by-default rework of the Docker API server. The pip library is unchanged. See deploy/docker/MIGRATION.md.
ID
Severity
Component
Description
Fix
-
CRITICAL
Docker API
Unauthenticated API served on 0.0.0.0 by default (CWE-306)
Auth on by default; loopback bind unless CRAWL4AI_API_TOKEN is set
-
CRITICAL
Docker API
Request-supplied hook code executed on the server (CWE-94)
hooks.code removed; fixed set of declarative hook actions
-
HIGH
Docker API
Chromium launch-arg injection via request-supplied browser_config.extra_args (CWE-94)
extra_args rejected at the network boundary
-
HIGH
Docker API
Path traversal to file write via download sinks (CWE-22)
basename + realpath + O_NOFOLLOW confinement
-
HIGH
Docker API
SSRF on /crawl/stream and /crawl with stream=true (CWE-918)
Destination validation added; HTTP 400 on disallowed targets
-
HIGH
Docker API
Request body could drive browser internals (js_code, proxy_config, cdp_url, user_data_dir, cookies, headers, init_scripts, base_url, ...)
PyPI supply-chain compromise of the litellm dependency
Dependency replaced with unclecode-litellm
Fixed in v0.8.5 (2026-03-18)
ID
Severity
Component
Description
Fix
CVE-2025-49844
CRITICAL (10.0)
Docker (Redis)
Lua use-after-free in bundled Redis
Redis upgraded to 7.2.7
-
MEDIUM
Library
XSS via innerHTML in iframe processing
DOMParser used instead (#1796)
-
MEDIUM
Docker API
/token endpoint issued tokens without checking api_token
api_token required when configured (#1795)
Fixed in v0.8.1 (2026-01-30)
ID
Severity
Component
Description
Fix
CVE-pending-3
CRITICAL
Docker API
RCE via deserialization + eval() in /crawl endpoint
Allowlisted deserializable types; AST-validated computed field expressions (later removed entirely in 0.8.7)
Fixed in v0.8.0 (2026-01-16)
ID
Severity
Component
Description
Fix
CVE-pending-1
CRITICAL
Docker API
RCE via hooks __import__
Removed from allowed builtins; hooks disabled by default
CVE-pending-2
HIGH
Docker API
LFI via file:// URLs
URL scheme validation added
Security Features
v0.9.5+
Cache freshness check through the egress proxy: CacheValidator uses the same pinning proxy as the seeder and robots.txt
More untrusted fields refused: JavaScript wait_for, CosineStrategy.model_name, and caller-supplied regexes
Delay caps: delay_before_return_html, mean_delay, and max_range capped at 60 seconds for untrusted bodies
TLS verification on in Chromium: --ignore-certificate-errors no longer in the default launch flags
Fail-closed egress pinning: a crawl that cannot be pinned to the egress proxy is refused
v0.9.4+
Library egress proxy: crawl4ai/egress_policy.py routes the library's own HTTP clients (URL seeder, robots.txt) through the Docker server's pinning proxy, so they get the same resolve-and-pin rule as the browser
Link preview caps: LinkPreviewConfigmax_links (100), concurrency (10), and timeout (10 s) clamped for untrusted bodies
Nested typed objects gated: {"type": "dict"} wrappers are re-checked against UNTRUSTED_ALLOWED_TYPES
v0.9.3+
PDF egress policy: PDF downloads validate every redirect hop and the peer IP actually read, so the Docker SSRF policy also covers the out-of-browser requests path
PDF resource caps: max_pdf_bytes (100 MiB) and max_pdf_pages (2000), not raisable from an untrusted request body
PDF image-write fields filtered from untrusted bodies; extract_images forced off
Egress proxy upstream chaining: the pinning egress proxy honours HTTP_PROXY / HTTPS_PROXY and refuses non-http proxy schemes
Per-crawl wall clock: Docker config ships limits.wall_clock_s of 300 seconds
v0.9.0+ (Docker API server, secure by default)
Authentication on by default: loopback bind unless CRAWL4AI_API_TOKEN is set; Authorization: Bearer <token> required on every request except GET /health
Request trust boundary: crawl request bodies carry scalar, declarative options only; browser internals and code fields are rejected with HTTP 400; unknown fields dropped; timeouts, viewport and scroll counts clamped
eval() removed from computed fields and /config/dump
Protected env vars cannot be resolved through the LLMConfigenv: token form
CRLF-safe logging
v0.8.1+
Deserialization Allowlist: Only known-safe types can be instantiated via API config
v0.8.0+
URL Scheme Validation: Blocks file://, javascript:, data: URLs on API
Hooks Disabled by Default: Opt-in via CRAWL4AI_HOOKS_ENABLED=true (replaced by declarative hooks in 0.9.0)
Restricted Hook Builtins: No __import__, eval, exec, open
JWT Authentication: Optional (on by default since 0.9.0)
Rate Limiting: Configurable request limits
Security Headers: X-Frame-Options, CSP, HSTS when enabled
Acknowledgments
We thank the security researchers who responsibly disclosed the issues above. The full list, with the vulnerability each person reported and the release that fixed it, is maintained in SECURITY-CREDITS.md.