Crawl4AI < 0.8.0 Docker API Unauthenticated Remote Code Execution via Hooks Parameter
Description
Crawl4AI versions prior to 0.8.0 contain a remote code execution vulnerability in the Docker API deployment. The /crawl endpoint accepts a hooks parameter containing Python code that is executed using exec(). The __import__ builtin was included in the allowed builtins, allowing unauthenticated remote attackers to import arbitrary modules and execute system commands. Successful exploitation allows full server compromise, including arbitrary command execution, file read and write access, sensitive data exfiltration, and lateral movement within internal networks.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Crawl4AI before v0.8.0 allowed unauthenticated RCE via exec() in Docker API hooks, enabling full server compromise.
Vulnerability
Overview
Crawl4AI versions prior to 0.8.0 contain a critical remote code execution vulnerability in the Docker API deployment. The /crawl endpoint accepts a hooks parameter containing Python code that is executed using exec(). The __import__ builtin was included in the allowed builtins, allowing unauthenticated remote attackers to import arbitrary modules such as os and subprocess and execute system commands [1][2][3]. This design flaw allowed direct shell access without authentication, leading to full server compromise.
Exploitation
An attacker can exploit this vulnerability by sending a crafted POST request to the Docker API's /crawl endpoint with a malicious hooks parameter. No authentication is required. The vulnerability is only present in the Docker API deployment; users of the Python library directly are not affected [2][3]. The attack surface is the exposed Docker API endpoint, which if reachable over the network, can be targeted by any unauthenticated remote attacker.
Impact
Successful exploitation grants arbitrary command execution, file read and write access, sensitive data exfiltration, and lateral movement within internal networks [1]. The severity is rated CRITICAL with a CVSS score of 10.0 [3][4]. An attacker can completely compromise the server hosting the Crawl4AI Docker API.
Mitigation
The vulnerability is fixed in Crawl4AI v0.8.0, released in January 2026. The fix removed __import__ from the allowed builtins and disabled hooks by default (enabled only via CRAWL4AI_HOOKS_ENABLED=true) [2][3][4]. Users are strongly advised to update immediately. Additionally, file:// URLs were blocked to address a related Local File Inclusion vulnerability [3][4].
- GitHub - unclecode/crawl4ai: 🚀🤖 Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper. Don't be shy, join here: https://discord.gg/jP8KfhDhyN
- crawl4ai/docs/migration/v0.8.0-upgrade-guide.md at release/v0.8.0 · unclecode/crawl4ai
- crawl4ai/docs/blog/release-v0.8.0.md at main · unclecode/crawl4ai
- crawl4ai/docs/blog/release-v0.8.0.md at release/v0.8.0 · unclecode/crawl4ai
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
Crawl4AIPyPI | < 0.8.0 | 0.8.0 |
Affected products
2- unclecode/Crawl4AIv5Range: 0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-5882-5rx9-xgxpghsaADVISORY
- github.com/unclecode/crawl4ai/security/advisories/GHSA-5882-5rx9-xgxpghsavendor-advisorypatchWEB
- nvd.nist.gov/vuln/detail/CVE-2026-26216ghsaADVISORY
- www.vulncheck.com/advisories/crawl4ai-docker-api-unauthenticated-remote-code-execution-via-hooks-parameterghsathird-party-advisoryWEB
- github.com/unclecode/crawl4ai/blob/main/docs/blog/release-v0.8.0.mdghsarelease-notesWEB
- github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/blog/release-v0.8.0.mdghsaWEB
- github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/migration/v0.8.0-upgrade-guide.mdghsaWEB
News mentions
0No linked articles in our index yet.