CVE-2026-31231
JSON

9.8critical

Cognee thru v0.4.0 contains a critical remote code execution vulnerability in its notebook cell execution API endpoint.

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
0.64% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

Cognee thru v0.4.0 contains a critical remote code execution vulnerability in its notebook cell execution API endpoint. The endpoint is designed to execute arbitrary Python code provided by the user, but it does so using the unsafe exec() function without any sandboxing, validation, or security controls. An attacker can exploit this by sending a specially crafted POST request containing malicious Python code to the execution endpoint. This leads to arbitrary code execution on the Cognee server with the privileges of the server process, allowing complete compromise of the system.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Cognee thru v0.4.0 contains a critical remote code execution vulnerability in its notebook cell execution API endpoint. The endpoint is designed to execute arbitrary Python code provided by the user, but it does so using the unsafe exec() function without any sandboxing, validation, or security controls. An attacker can exploit this by sending a specially crafted POST request containing malicious Python code to the execution endpoint. This leads to arbitrary code execution on the Cognee server with the privileges of the server process, allowing complete compromise of the system.

NVD (es)

Cognee hasta la v0.4.0 contiene una crítica vulnerabilidad de ejecución remota de código en su endpoint de API de ejecución de celdas de notebook. El endpoint está diseñado para ejecutar código Python arbitrario proporcionado por el usuario, pero lo hace usando la función insegura exec() sin ningún sandboxing, validación o controles de seguridad. Un atacante puede explotar esto enviando una solicitud POST especialmente diseñada que contiene código Python malicioso al endpoint de ejecución. Esto conduce a la ejecución de código arbitrario en el servidor Cognee con los privilegios del proceso del servidor, permitiendo el compromiso completo del sistema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31231 changed 2026-05-15CVE Terms of Use
NVDCVE-2026-31231 changed 2026-10-19Public domain