Critical (10.0)

CVE-2026-26216

Crawl4AI versions prior to 0.8.0 contain a remote code execution vulnerability in the Docker API deployment. The /crawl endpoint accepts a hooks parameter containing Python code that is executed using...

CVSS Score 10.0

Overview

A critical security vulnerability has been identified in Crawl4AI, a tool used for web scraping and data extraction. This flaw allows an unauthenticated attacker to remotely execute any code they choose on a server running a vulnerable version of the software, granting them complete control.

Vulnerability Details

In affected versions (prior to 0.8.0), the software’s deployment feature that uses Docker contains a dangerous flaw. A specific endpoint (/crawl) is designed to accept instructions, including Python code, to customize its behavior. This code is processed using the insecure exec() function. While some safeguards were in place, a critical oversight left the powerful __import__ function available. This allows an attacker to import standard Python modules like os or subprocess, bypassing restrictions and directly executing operating system commands on the underlying server.

Potential Impact

The impact of this vulnerability is severe (CVSS Score: 10.0). A successful attack leads to full compromise of the affected server. Specifically, an attacker can:

  • Execute arbitrary commands to install malware or ransomware.
  • Read, modify, or delete sensitive files and data.
  • Steal credentials, API keys, or database information.
  • Use the compromised server as a foothold to attack other systems on the internal network.

Any server running a vulnerable, internet-accessible instance of Crawl4AI is at immediate risk.

Remediation and Mitigation

Immediate action is required to secure affected systems.

Primary Remediation: The fix is to upgrade to Crawl4AI version 0.8.0 or later. This version removes the dangerous exec() functionality from the affected endpoint. Update your installation as soon as possible using your standard package management procedures (e.g., pip install --upgrade crawl4ai).

Immediate Mitigation (If Unable to Patch Immediately): If you cannot upgrade immediately, you must:

  1. Restrict Access: Ensure the Crawl4AI service is not exposed directly to the internet. Place it behind a firewall or VPN, allowing access only from strictly necessary, trusted IP addresses.
  2. Assess for Compromise: Review the server for any signs of unauthorized access, such as unfamiliar processes, new user accounts, or unexpected network connections. Assume the server is compromised if it was exposed to untrusted networks.

General Advice: Always run services with the minimum necessary permissions and keep all software components updated to their latest secure versions.