🔍 CVE-2026-80104

9.8
CVSS Score
CRITICAL
2026-08-25
2026-09-23 17:17
✅ 완료

🇰🇷 한글 설명

DB-GPT의 skill_upload 기능에서 파일 이름에 대한 경로 검증이 누락되어 발생하는 경로 탐색(Path Traversal) 취약점입니다. 공격자는 인증 없이도 임의의 경로에 파일을 작성할 수 있으며, 이를 통해 파이썬 모듈을 조작하여 원격 코드 실행(RCE)을 달성할 수 있습니다.

💡 쉬운 설명

해커가 파일 이름에 특수 문자를 섞어 보내면 서버의 허용된 폴더가 아닌 엉뚱한 곳에 파일을 저장할 수 있는 문제입니다. 이를 이용해 악성 코드를 서버에 심고 컴퓨터를 마음대로 조종할 수 있습니다.

🇺🇸 원문 (English)

DB-GPT builds the destination path for an uploaded skill from the multipart filename without constraining it to the upload directory. skill_upload in packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/agentic_data_api.py takes file.filename as given and writes the request body to upload_dir / filename. A path composed with that operator discards the left operand when the right one is absolute and follows parent references otherwise, so a filename such as ../../../tmp/x or /tmp/x resolves outside the intended directory; nothing canonicalises the result, checks that it remains under the upload root, or prevents a .py suffix. The route's only dependency is get_user_from_headers in dbgpt_serve/utils/auth.py, which returns a request carrying the admin role whether or not a user_id header is supplied, so the endpoint is reachable without credentials. A remote attacker holding no account can therefore write attacker-controlled bytes to any path the server process can write, place a new Python module inside the application package or replace one the application already imports, and obtain code execution in the server process when that module is next imported.

📍 영향받는 시스템

DB-GPT (인증 우회 및 경로 탐색 취약점이 포함된 버전)

⚔️ 공격 벡터

인증 없이 multipart/form-data 요청의 filename 파라미터에 ../../ 등의 경로 탐색 문자를 삽입하여 공격

🛡️ 대응 방법

파일 업로드 시 파일 이름을 정규화(canonicalization)하고, 저장 경로가 지정된 디렉토리 내에 있는지 검증하며, 파일 확장자 제한 로직을 추가해야 합니다.

🔧 검증 코드

해당 명령어로 DB-GPT 설치 경로를 확인한 후, 취약한 API 엔드포인트에 대한 접근 권한 및 파일 쓰기 테스트를 수행하여 검증합니다.

Shell / Script
find / -name "dbgpt_app" -type d 2>/dev/null

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

IBM WebSphere Application Server