# CVE-2026-31231: Cognee thru v0.4.0 contains a critical remote code execution vulnerability in its notebook cell execution API endpoint.

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.64%, higher than 51% of CVEs (2026-12-01)
- Published: 2026-05-12T00:00:00.000Z
- Modified: 2026-10-19T22:10:00.130Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a

## References

- <https://github.com/topoteretes/cognee>
- <https://www.notion.so/CVE-2026-31231-35d1e13931888178a963ef9efeb29113>

## Sources

- CVE List: [CVE-2026-31231](https://www.cve.org/CVERecord?id=CVE-2026-31231), CVE Terms of Use, modified 2026-05-15
- NVD: [CVE-2026-31231](https://nvd.nist.gov/vuln/detail/CVE-2026-31231), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-31231 · Whole record: https://cve.day/CVE-2026-31231.json · Rebuilt by cve.day 2026-11-25T22:59:21.386Z
