PyPI: crawl4ai
GHSA-f989-c77f-r2cq
Safety vulnerability ID: SFTY-20260616-04353
Affected versions of the Crawl4AI package are vulnerable to Information Disclosure due to improper handling of request parameters and environment variable resolution. The `/md`, `/llm`, and `/llm/job` endpoints accept a `base_url` parameter, which an attacker can set to a controlled server, causing the server's configured provider API key to be sent to the attacker's endpoint. Additionally, the `LLMConfig` class resolves tokens from environment variables using the `os.getenv` function, allowing an attacker to specify sensitive variable names like `SECRET_KEY` in the request body to exfiltrate secrets. An attacker can exploit these vulnerabilities to obtain LLM provider API keys and other sensitive server-held secrets, potentially leading to authentication bypass if the `SECRET_KEY` is exposed.
Overview
Crawl4AI: LLM credential exfiltration in Docker server via request base_url and env: token resolution
Advisory
Crawl4AI – Information Disclosure
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
