🇰🇷 한글 설명
Cognee v0.4.0 이하는 노트북 셀 실행 API 엔드포인트에서 unsafe exec() 함수로 임의의 파이썬 코드를 실행하도록 설계되었으나 샌드박싱, 검증, 보안 제어가 전혀 없습니다. 공격자가 악의적인 파이썬 코드를 POST 요청으로 전송하면 서버 프로세스 권한으로 임의 코드가 실행되어 시스템이 완전히 침해됩니다.
💡 쉬운 설명
Cognee 프로그램의 코드 실행 기능이 아무런 보안 검사 없이 모든 코드를 받아서 실행합니다. 악의적인 사람이 나쁜 코드를 보내면 서버 전체를 장악할 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
Cognee v0.4.0 이하
⚔️ 공격 벡터
POST 요청으로 notebook cell execution API 엔드포인트에 악의적인 파이썬 코드 전송
🛡️ 대응 방법
Cognee를 v0.4.1 이상으로 업그레이드하거나 API 엔드포인트에 인증, 접근 제어, 코드 검증 적용
🔧 검증 코드
Version이 0.4.0 이하면 취약, 0.4.1 이상이면 안전합니다.
pip show cognee | grep Version || python -c "import cognee; print(cognee.__version__)" 2>/dev/null