GHSA-f989-c77f-r2cq: Crawl4AI LLM Credential Exfiltration Vulnerability

HIGH
CVSS 8.2
CWE-522 CWE-918 CWE-200
Published
Advisory Summary

GHSA-f989-c77f-r2cq is a HIGH (CVSS 8.2) llm credential exfiltration vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Crawl4AI libraries in the PyPI ecosystem. The issue involves llm credential exfiltration in docker server via request base_url and env: token resolution. Remediation is available by upgrading affected packages to version 0.8.8.

GHSA-f989-c77f-r2cq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-f989-c77f-r2cq
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Crawl4AI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.2

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

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

How to Fix GHSA-f989-c77f-r2cq

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

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

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

pip show crawl4ai

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-f989-c77f-r2cq, inspect your installed packages using pip:

pip show crawl4ai

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Crawl4AI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The 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. ### Vector 1 - attacker base_url `/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. ### Vector 2 - arbitrary environment variable read via `env:` `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. ### Impact Disclosure of LLM provider API keys and other server secrets to an attacker-controlled endpoint; reading the JWT `SECRET_KEY` can lead to authentication bypass. ### Fix - 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). - `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. ### Workarounds - Upgrade to the patched version. - Enable authentication (`CRAWL4AI_API_TOKEN`). - Do not place sensitive secrets in the server environment alongside provider keys. ### Credits - Geo ([geo-chen](https://github.com/geo-chen)) - reported the LLM credential exfiltration via request base_url. - Internal security audit (Crawl4AI maintainers) - the env: arbitrary-variable read.

GHSA-f989-c77f-r2cq Affected Crawl4AI Versions

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

References

Frequently Asked Questions

What is GHSA-f989-c77f-r2cq?
GHSA-f989-c77f-r2cq is a security vulnerability in Crawl4AI involving LLM credential exfiltration in Docker server via request base_url and env: token resolution under CWE-522: Insufficiently Protected Credentials.
Which Crawl4AI versions are affected?
Affected versions include releases prior to 0.8.8 across affected packages: crawl4ai.
What version fixes GHSA-f989-c77f-r2cq?
Upgrading to 0.8.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is crawl4ai affected?
Yes, crawl4ai is affected in releases prior to 0.8.8. Upgrade your dependency to 0.8.8 or later.
What is the CVSS score of GHSA-f989-c77f-r2cq?
GHSA-f989-c77f-r2cq has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with GHSA-f989-c77f-r2cq?
GHSA-f989-c77f-r2cq is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check PyPI dependencies for GHSA-f989-c77f-r2cq?
Run the dependency tree command: 'pip show crawl4ai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f989-c77f-r2cq",
  "modified" : "2026-06-16T21:00:31Z",
  "published" : "2026-06-16T21:00:31Z",
  "aliases" : [ ],
  "summary" : "Crawl4AI: LLM credential exfiltration in Docker server via request base_url and env: token resolution",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "crawl4ai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.7"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/unclecode/crawl4ai/security/advisories/GHSA-f989-c77f-r2cq"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/unclecode/crawl4ai"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-522", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-16T21:00:31Z",
    "nvd_published_at" : null
  }
}