Loading advisory.
Loading advisory.
Crawl4AI: AST Sandbox Escape via gi_frame.f_back Chain - Pre-Auth RCE in Docker API
The _safe_eval_expression() function in the computed fields feature uses an AST validator that only blocks attributes starting with underscore.
Published 2026-06-16 20:13 UTC · Modified 2026-07-20 21:30 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| crawl4ai | PyPI | < 0.8.7 versions 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.71, 0.3.72, 0.3.73, 0.3.731, 0.3.74, 0.3.741, 0.3.742, 0.3.743, 0.3.744, 0.3.745, 0.3.746, 0.3.8 and 44 more | 0.8.7 | pip install --upgrade 'crawl4ai>=0.8.7' |
The _safe_eval_expression() function in the computed fields feature uses an AST validator that only blocks attributes starting with underscore. Python generator and frame object attributes (gi_frame, f_back, f_builtins) do NOT start with underscore, enabling a complete sandbox escape to achieve arbitrary code execution.
The attack requires no authentication (JWT disabled by default) and is triggered via POST /crawl with a crafted extraction schema.
An attacker sends a POST /crawl request with a JsonCssExtractionStrategy schema containing a malicious computed field expression that:
Creates a generator to access gi_frame
Walks the frame chain via f_back
Reaches f_builtins containing the real __import__
Imports os and executes arbitrary commands
Unauthenticated remote code execution inside the Docker container. An attacker can execute arbitrary system commands, read/write files, and exfiltrate secrets.
Removed eval() from computed field expression path entirely -- expressions now log a warning and return default value
Deleted _safe_eval_expression() function and _SAFE_EVAL_BUILTINS (dead security-sensitive code)
function key with Python callables still works for SDK users
Replaced eval() in /config/dump with JSON-based input validated by Pydantic
Fixed hook_manager sandbox: stripped __builtins__, __loader__, __spec__ from injected modules; removed getattr, setattr, type, __build_class__ from allowed builtins
Upgrade to the patched version (recommended)
Enable JWT authentication via CRAWL4AI_API_TOKEN environment variable
Restrict network access to the Docker API
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.024 on 2026-11-24 to 0.029 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.024 | first score | v2026.06.15 |
| 2026-11-26 | 0.029 | 0.024 | v2026.06.15 |