CVE-2026-53753: Crawl4AI Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-qxjp-w3pj-48m7
CVSS 9.8
CWE-913 CWE-94
Published
Advisory Summary

CVE-2026-53753 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-913: Improper Control of Dynamically-Managed Code Resources) affecting Crawl4AI libraries in the PyPI ecosystem. The issue involves ast sandbox escape via gi_frame.f_back chain - pre-auth rce in docker api. Remediation is available by upgrading affected packages to version 0.8.7.

CVE-2026-53753 at a Glance

CVE Identifier CVE-2026-53753
GHSA Identifier GHSA-qxjp-w3pj-48m7
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-913: Improper Control of Dynamically-Managed Code Resources
Affected Product Crawl4AI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-53753

To remediate this vulnerability, upgrade all affected Crawl4AI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

crawl4ai fixed: 0.8.7
pip install crawl4ai>=0.8.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show crawl4ai

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-53753, inspect your installed packages using pip:

pip show crawl4ai

Analyze the terminal output to locate any version of Crawl4AI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.7), your application is affected.

Note: The pip show crawl4ai command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources, where the product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements. In Crawl4AI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: 1. Creates a generator to access `gi_frame` 2. Walks the frame chain via `f_back` 3. Reaches `f_builtins` containing the real `__import__` 4. Imports `os` and 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 1. Removed `eval()` from computed field expression path entirely -- expressions now log a warning and return default value 2. Deleted `_safe_eval_expression()` function and `_SAFE_EVAL_BUILTINS` (dead security-sensitive code) 3. `function` key with Python callables still works for SDK users 4. Replaced `eval()` in `/config/dump` with JSON-based input validated by Pydantic 5. Fixed hook_manager sandbox: stripped `__builtins__`, `__loader__`, `__spec__` from injected modules; removed `getattr`, `setattr`, `type`, `__build_class__` from allowed builtins ### Workarounds 1. Upgrade to the patched version (recommended) 2. Enable JWT authentication via `CRAWL4AI_API_TOKEN` environment variable 3. Restrict network access to the Docker API ### Credits - Song Binglin ([q1uf3ng](https://github.com/q1uf3ng)) - reported the AST sandbox escape - by111 ([August829](https://github.com/August829)) - reported the hook sandbox `__builtins__` escape and hardcoded JWT secret bypass - [jannahopp](https://github.com/jannahopp) - PR #1855 proposing eval removal - [ntohidi](https://github.com/ntohidi) - PR #1886 proposing allowlist approach

CVE-2026-53753 Affected Crawl4AI Versions

1 component(s)
Fixed Versions:
0.8.7
Product / Package Ecosystem Affected Versions Fixed Version
crawl4ai
PyPI
< 0.8.7
0.8.7

References

Frequently Asked Questions

What is CVE-2026-53753?
CVE-2026-53753 is a security vulnerability in Crawl4AI involving AST Sandbox Escape via gi_frame.f_back Chain - Pre-Auth RCE in Docker API under CWE-913: Improper Control of Dynamically-Managed Code Resources.
Which Crawl4AI versions are affected?
Affected versions include releases prior to 0.8.7 across affected packages: crawl4ai.
What version fixes CVE-2026-53753?
Upgrading to 0.8.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is crawl4ai affected?
Yes, crawl4ai is affected in releases prior to 0.8.7. Upgrade your dependency to 0.8.7 or later.
What is the CVSS score of CVE-2026-53753?
CVE-2026-53753 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-53753?
CVE-2026-53753 is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources (The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.).
How can I check PyPI dependencies for CVE-2026-53753?
Run the dependency tree command: 'pip show crawl4ai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qxjp-w3pj-48m7",
  "modified" : "2026-07-20T21:11:44Z",
  "published" : "2026-06-16T20:13:07Z",
  "aliases" : [ "CVE-2026-53753" ],
  "summary" : "Crawl4AI: AST Sandbox Escape via gi_frame.f_back Chain - Pre-Auth RCE in Docker API",
  "details" : "### Summary\n\nThe `_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.\n\nThe attack requires no authentication (JWT disabled by default) and is triggered via `POST /crawl` with a crafted extraction schema.\n\n### Attack Vector\n\nAn attacker sends a `POST /crawl` request with a `JsonCssExtractionStrategy` schema containing a malicious computed field expression that:\n1. Creates a generator to access `gi_frame`\n2. Walks the frame chain via `f_back`\n3. Reaches `f_builtins` containing the real `__import__`\n4. Imports `os` and executes arbitrary commands\n\n### Impact\n\nUnauthenticated remote code execution inside the Docker container. An attacker can execute arbitrary system commands, read/write files, and exfiltrate secrets.\n\n### Fix Details\n\n1. Removed `eval()` from computed field expression path entirely -- expressions now log a warning and return default value\n2. Deleted `_safe_eval_expression()` function and `_SAFE_EVAL_BUILTINS` (dead security-sensitive code)\n3. `function` key with Python callables still works for SDK users\n4. Replaced `eval()` in `/config/dump` with JSON-based input validated by Pydantic\n5. Fixed hook_manager sandbox: stripped `__builtins__`, `__loader__`, `__spec__` from injected modules; removed `getattr`, `setattr`, `type`, `__build_class__` from allowed builtins\n\n### Workarounds\n\n1. Upgrade to the patched version (recommended)\n2. Enable JWT authentication via `CRAWL4AI_API_TOKEN` environment variable\n3. Restrict network access to the Docker API\n\n### Credits\n\n- Song Binglin ([q1uf3ng](https://github.com/q1uf3ng)) - reported the AST sandbox escape\n- by111 ([August829](https://github.com/August829)) - reported the hook sandbox `__builtins__` escape and hardcoded JWT secret bypass\n- [jannahopp](https://github.com/jannahopp) - PR #1855 proposing eval removal\n- [ntohidi](https://github.com/ntohidi) - PR #1886 proposing allowlist approach",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "crawl4ai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.8.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.6"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/unclecode/crawl4ai/security/advisories/GHSA-qxjp-w3pj-48m7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-53753"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unclecode/crawl4ai/pull/1855"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unclecode/crawl4ai/pull/1886"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-qxjp-w3pj-48m7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/crawl4ai/PYSEC-2026-319.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/unclecode/crawl4ai"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/crawl4ai"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-913", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-16T20:13:07Z",
    "nvd_published_at" : "2026-06-23T19:17:07Z"
  }
}