Skip to content
Xianzhi Community (Aliyun)·Indexed by this site · Originally published· Event →SelectedAttention41

CVE-2026-26216: Crawl4AI's hooks parameter and an import that should not have been left on the allowlist

AI summary

Crawl4AI was disclosed as CVE-2026-26216; versions before 0.8.0 have unauthenticated remote code execution under the default Docker deployment, with a CVSS of 10.0. The vulnerability entry point is the hooks.code parameter of POST /crawl; when the code is executed via exec, the hand-written builtins allowlist retains __import__, which can be used to import arbitrary modules and execute commands. The author reproduced it in a local replica environment and obtained command output with root privileges inside the container. 0.8.0 removes dangerous items such as __import__ from the allowlist, changes hooks to be enabled only when CRAWL4AI_HOOKS_ENABLED=true is set, and adds type checking for hooks.code; if not upgraded, one can block /crawl, enforce JWT, switch to non-root operation, and avoid exposing port 11235.

Why it was selected

The article breaks down the root cause of how Crawl4AI's hooks sandbox was bypassed because the allowlist retained __import__, reproduces unauthenticated command execution under the default deployment, and gives upgrade and temporary mitigation recommendations.

Read originalxz.aliyun.com