Severity by source
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Default-disabled auth gives PR:N over the network with a single low-complexity request; sandbox-to-container escape justifies S:C, and full RCE yields C:H/I:H/A:H.
Primary rating from NVD.
CVSS VectorNVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Lifecycle Timeline
7DescriptionNVD
Summary
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.
Attack Vector
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_builtinscontaining the real__import__ - Imports
osand executes arbitrary commands
Impact
Unauthenticated remote code execution inside the Docker container. An attacker can execute arbitrary system commands, read/write files, and exfiltrate secrets.
Fix Details
- 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) functionkey with Python callables still works for SDK users- Replaced
eval()in/config/dumpwith JSON-based input validated by Pydantic - Fixed hook_manager sandbox: stripped
__builtins__,__loader__,__spec__from injected modules; removedgetattr,setattr,type,__build_class__from allowed builtins
Workarounds
- Upgrade to the patched version (recommended)
- Enable JWT authentication via
CRAWL4AI_API_TOKENenvironment variable - Restrict network access to the Docker API
Credits
Articles & Coverage 3
AnalysisAI
Unauthenticated remote code execution in Crawl4AI's Docker API (versions <= 0.8.6) lets attackers escape the computed-fields expression sandbox and run arbitrary OS commands inside the container. The AST validator behind _safe_eval_expression() only blocked attribute names beginning with an underscore, so a crafted JsonCssExtractionStrategy schema can reach generator/frame attributes (gi_frame, f_back, f_builtins) to recover the real __import__ and execute code. Because JWT auth is disabled by default, a single POST /crawl request suffices; publicly available exploit code exists (SSVC: PoC) and the vendor rates it CVSS 10.0, though EPSS is low at 0.45%.
Technical ContextAI
Crawl4AI is a Python web-crawling/scraping library (pkg:pip/crawl4ai) that ships a FastAPI-style Docker service exposing a /crawl endpoint. Its 'computed fields' extraction feature evaluated user-supplied expressions with eval(), guarded only by an AST-based denylist that rejected attribute access for names starting with _. This is a classic CWE-94 (Code Injection) flaw: the denylist failed to account for Python introspection attributes that are not underscore-prefixed - generator objects expose gi_frame, and frame objects expose f_back and f_builtins, the latter holding the genuine __import__. Walking the frame chain reconstitutes full builtin access, defeating the restricted-builtins (_SAFE_EVAL_BUILTINS) sandbox entirely. A related weakness existed in the hook_manager sandbox, where injected modules still exposed __builtins__, __loader__, and __spec__, plus dangerous builtins (getattr, setattr, type, __build_class__).
RemediationAI
Vendor-released patch: upgrade to Crawl4AI 0.8.7, which removes eval() from the computed-field expression path (expressions now log a warning and return the default value), deletes the dead _safe_eval_expression()/_SAFE_EVAL_BUILTINS code, replaces eval() in /config/dump with Pydantic-validated JSON input, and hardens the hook_manager sandbox (strips __builtins__/__loader__/__spec__ and removes getattr/setattr/type/__build_class__); see PRs https://github.com/unclecode/crawl4ai/pull/1855 and https://github.com/unclecode/crawl4ai/pull/1886. If you cannot upgrade immediately, enable JWT authentication by setting the CRAWL4AI_API_TOKEN environment variable (note: a hardcoded-JWT-secret bypass was also reported, so verify the token is actually enforced on your version), and restrict network access to the Docker API so only trusted internal hosts can reach /crawl (trade-off: this breaks any legitimate remote clients that rely on the open endpoint). SDK users who need programmatic computed fields should migrate from the expression key to the still-supported function key with Python callables.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-94 – Code Injection
View allSame technique Code Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38569
GHSA-qxjp-w3pj-48m7