{"id":"CVE-2026-56259","aliases":["CVE-2026-56259","GHSA-f989-c77f-r2cq","PYSEC-2026-3448"],"related":[],"kind":"vulnerability","state":"published","title":"Crawl4AI - LLM Credential Exfiltration via base_url and Environment Variable Resolution","summary":"Crawl4AI before 0.8.8 contains credential exfiltration vulnerabilities in the Docker API server that allow attackers to redirect LLM API calls to attacker-controlled endpoints and read arbitrary environment variables. Attackers can exploit the unauthenticated /md, /llm, and /llm/job endpoints by supplying a malicious base_url parameter and setting api_token to env:VARIABLE_NAME to exfiltrate provider API keys and server secrets including JWT SECRET_KEY for authentication bypass.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Crawl4AI before 0.8.8 contains credential exfiltration vulnerabilities in the Docker API server that allow attackers to redirect LLM API calls to attacker-controlled endpoints and read arbitrary environment variables. Attackers can exploit the unauthenticated /md, /llm, and /llm/job endpoints by supplying a malicious base_url parameter and setting api_token to env:VARIABLE_NAME to exfiltrate provider API keys and server secrets including JWT SECRET_KEY for authentication bypass.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe Docker API server let a request control where LLM calls were sent and which environment variable an LLM token resolved from. Both could be abused to exfiltrate server-held secrets. The Docker API is unauthenticated by default.\n\n### Vector 1 - attacker base_url\n\n`/md`, `/llm`, and `/llm/job` accepted a `base_url` in the request and used it as the LLM endpoint while still attaching the server's configured provider API key. An attacker set `base_url` to a server they control and received the provider key (and any provider keys the server holds) in the inbound request.\n\n### Vector 2 - arbitrary environment variable read via `env:`\n\n`LLMConfig(api_token=\"env:NAME\")` resolved `NAME` from the server environment with `os.getenv`. Because request bodies were deserialized into `LLMConfig` (via a crawler config / extraction strategy), an attacker could set `api_token=\"env:SECRET_KEY\"` (or `env:REDIS_PASSWORD`, etc.) and, paired with an attacker `base_url`, exfiltrate that secret. Reading the server's `SECRET_KEY` enables forging authentication tokens.\n\n### Impact\n\nDisclosure of LLM provider API keys and other server secrets to an attacker-controlled endpoint; reading the JWT `SECRET_KEY` can lead to authentication bypass.\n\n### Fix\n\n- The LLM endpoints ignore a request-supplied `base_url`; the endpoint is always derived server-side from the provider name. The field is still accepted but no longer honored (no breaking 4xx).\n- `LLMConfig` refuses `env:` resolution of protected environment-variable names (names containing SECRET/PASSWORD/PRIVATE, prefixes CRAWL4AI*/AWS_SECRET*, and SECRET_KEY/REDIS_PASSWORD/TOKEN). Normal provider keys (e.g. OPENAI_API_KEY) are unaffected.\n\n### Workarounds\n\n- Upgrade to the patched version.\n- Enable authentication (`CRAWL4AI_API_TOKEN`).\n- Do not place sensitive secrets in the server environment alongside provider keys.\n\n### Credits\n\n- Geo ([geo-chen](https://github.com/geo-chen)) - reported the LLM credential exfiltration via request base_url.\n- Internal security audit (Crawl4AI maintainers) - the env: arbitrary-variable read.","format":"markdown","source":"ghsa"}],"published":"2026-06-16T21:00:31.000Z","modified":"2026-09-24T14:17:50.845Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","score":8.8,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"}],"cwes":["CWE-200","CWE-522","CWE-918"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.8.8","status":"affected"},{"type":"semver","version":"0.8.8","status":"unaffected"}],"vendor":"Crawl4AI","product":"Crawl4AI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.8.8"}],"ecosystem":"PyPI","package":"crawl4ai","purl":"pkg:pypi/crawl4ai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.8.8"}],"vendor":"kidocode","product":"crawl4ai","cpe":"cpe:2.3:a:kidocode:crawl4ai:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.8.8"}],"ecosystem":"PyPI","package":"crawl4ai","purl":"pkg:pypi/crawl4ai","source":"pysec"}],"references":[{"url":"https://github.com/unclecode/crawl4ai/security/advisories/GHSA-f989-c77f-r2cq","tags":["advisory","mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/crawl4ai-llm-credential-exfiltration-via-base-url-and-environment-variable-resolution","tags":["advisory","third-party-advisory"],"sources":["cvelist","nvd","pysec"]},{"url":"https://github.com/unclecode/crawl4ai","tags":["package"],"sources":["ghsa"]}],"credits":["George Chen"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-14T14:10:22.426Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56259","url":"https://www.cve.org/CVERecord?id=CVE-2026-56259","licence":"CVE Terms of Use","modified":"2026-09-24T14:17:50.845Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f989-c77f-r2cq","url":"https://github.com/advisories/GHSA-f989-c77f-r2cq","licence":"CC-BY-4.0","modified":"2026-07-15T20:11:30.371Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56259","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56259","licence":"Public domain","modified":"2026-07-14T18:29:21.830Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3448","url":"https://osv.dev/vulnerability/PYSEC-2026-3448","licence":"CC-BY-4.0","modified":"2026-07-15T20:00:06.248Z"}],"updatedAt":"2026-11-25T22:59:27.754Z","epss":{"score":0.00308,"percentile":0.25411,"date":"2026-12-01T12:00:22.000Z"}}