← Back to CVE Explorer

CVE-2026-31231

Full vulnerability record from the local CVENow database.

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.

Severity
CRITICAL
CVSS score
9.8 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-05-12 18:16:51.387000
Last modified
2026-10-19 22:10:00.130000
View original CVE JSON
{
  "id": "CVE-2026-31231",
  "sourceIdentifier": "[email protected]",
  "published": "2026-05-12T18:16:51.387",
  "lastModified": "2026-10-19T22:10:00.130",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "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."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "n/a",
          "product": "n/a",
          "versions": [
            {
              "version": "n/a",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
          "baseScore": 9.8,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 5.9
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-05-15T17:18:25.166307Z",
          "id": "CVE-2026-31231",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-94"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/topoteretes/cognee",
      "source": "[email protected]"
    },
    {
      "url": "https://www.notion.so/CVE-2026-31231-35d1e13931888178a963ef9efeb29113",
      "source": "[email protected]"
    }
  ]
}