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.

Created at: Jun 19, 2026Updated at: Jun 19, 2026

Overview

Crawl4AI: LLM credential exfiltration in Docker server via request base_url and env: token resolution

Advisory

Crawl4AI – Information Disclosure

Affected Package

Affecting crawl4ai package, versions
<= 0.8.7

Also affects

---

How to Fix

Upgrade
crawl4ai
to
0.8.8
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

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