Skip to content
CriticalVulnerability

GHSA-5882-5rx9-xgxp: Crawl4AI is Vulnerable to Remote Code Execution in Docker API via Hooks Parameter

Published
Record updated
View JSON
Affected
  • Crawl4AI < 0.8.0
Fixed in
0.8.0
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
6.3%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

The Crawl4AI Docker API deployment has a critical remote code execution flaw, tracked as GHSA-5882-5rx9-xgxp. The /crawl endpoint accepts a hooks parameter whose Python code runs through exec(), and __import__ was among the allowed builtins, so an unauthenticated attacker can run arbitrary system commands, read and write server files, exfiltrate environment variables and API keys, and pivot to internal services.

Mitigation

Upgrade to v0.8.0 (recommended). If upgrading is not possible immediately, disable the Docker API, block the /crawl endpoint at the network level, or add authentication to the API. The fix removes __import__ from allowed_builtins in hook_manager.py and disables hooks by default (CRAWL4AI_HOOKS_ENABLED=false), so users must explicitly opt in.