Remote Code Execution Vulnerability in Cognee by Topoteretes
CVE-2026-31231
9.8CRITICAL
What is CVE-2026-31231?
Cognee versions up to 0.4.0 contain a significant remote code execution vulnerability through its notebook cell execution API endpoint. The endpoint allows users to execute arbitrary Python code via a POST request but employs the unsafe exec() function without proper sandboxing or validation. This lack of security measures can be exploited by an attacker to send malicious Python code, leading to unauthorized execution of commands on the Cognee server. If successfully exploited, this vulnerability can compromise the entire server system, granting the attacker full control over the server process.
