🔍 CVE-2025-27519

0.0
CVSS Score
UNKNOWN
2025-03-07
2026-04-15 00:35
✅ 완료

🇰🇷 한글 설명

Cognita RAG 프레임워크의 /v1/internal/upload-to-local-directory 엔드포인트에서 경로 순회 취약점이 존재합니다. Local 환경변수가 활성화된 Docker 환경에서 공격자가 /app/backend/__init__.py 파일을 덮어쓰면 uvicorn auto reload에 의해 자동으로 실행되어 원격 코드 실행이 가능합니다.

💡 쉬운 설명

Cognita 소프트웨어의 파일 업로드 기능에서 공격자가 파일을 잘못된 위치에 저장하고 자동 재로드를 통해 실행할 수 있습니다. Docker로 운영되는 경우 컨테이너 내 모든 명령을 실행할 수 있게 됩니다.

🇺🇸 원문 (English)

Cognita is a RAG (Retrieval Augmented Generation) Framework for building modular, open source applications for production by TrueFoundry. A path traversal issue exists at /v1/internal/upload-to-local-directory which is enabled when the Local env variable is set to true, such as when Cognita is setup using Docker. Because the docker environment sets up the backend uvicorn server with auto reload enabled, when an attacker overwrites the /app/backend/__init__.py file, the file will automatically be reloaded and executed. This allows an attacker to get remote code execution in the context of the Docker container. This vulnerability is fixed in commit a78bd065e05a1b30a53a3386cc02e08c317d2243.

📍 영향받는 시스템

Cognita (Local=true로 설정된 Docker 환경), commit a78bd065e05a1b30a53a3386cc02e08c317d2243 이전 버전

⚔️ 공격 벡터

공격자가 /v1/internal/upload-to-local-directory에 악의적인 Python 코드가 포함된 파일을 업로드하여 경로 순회로 /app/backend/__init__.py를 덮어쓰면 자동 재로드시 RCE 달성

🛡️ 대응 방법

Cognita를 commit a78bd065e05a1b30a53a3386cc02e08c317d2243 이상의 버전으로 업데이트하거나, Local 환경변수를 false로 설정하여 해당 엔드포인트 비활성화

🔧 검증 코드

명령 실행 후 해시값 a78bd06이 나타나면 패치된 버전이며, 없으면 취약한 버전입니다. docker env 명령으로 Local 환경변수 값을 확인하여 true면 추가 위험입니다.

Shell / Script
docker exec <container_id> git log --oneline 2>/dev/null | grep -i 'a78bd06'

💻 영향받는 소프트웨어

Docker