🇰🇷 한글 설명
SQLBot은 대규모 언어 모델과 RAG를 기반으로 하는 지능형 데이터 쿼리 시스템입니다. 1.5.0 이전 버전에는 /api/v1/datasource/uploadExcel 엔드포인트에서 인증 누락 취약성이 존재하여 원격 비인증 공격자가 임의의 Excel/CSV 파일을 업로드하고 PostgreSQL 데이터베이스에 직접 데이터를 삽입할 수 있습니다. 이 취약점은 v1.5.0에서 수정되었습니다.
💡 쉬운 설명
SQLBot의 일부 버전은 인증 없이도 데이터베이스에 파일을 업로드할 수 있는 취약점이 있습니다. 이는 공격자가 임의의 데이터를 시스템에 삽입할 수 있는 보안 위협입니다. 시스템 관리자는 최신 버전으로 업데이트하여 이 취약점을 해결해야 합니다.
🇺🇸 원문 (English)
SQLBot is an intelligent data query system based on a large language model and RAG. Versions prior to 1.5.0 contain a missing authentication vulnerability in the /api/v1/datasource/uploadExcel endpoint, allowing a remote unauthenticated attacker to upload arbitrary Excel/CSV files and inject data directly into the PostgreSQL database. The endpoint is explicitly added to the authentication whitelist, causing the TokenMiddleware to bypass all token validation. Uploaded files are parsed by pandas and inserted into the database via to_sql() with if_exists='replace' mode. The vulnerability has been fixed in v1.5.0. No known workarounds are available.
📍 영향받는 시스템
SQLBot 1.5.0 이전 버전
⚔️ 공격 벡터
원격 비인증 공격자에 의한 /api/v1/datasource/uploadExcel 엔드포인트 악용
🛡️ 대응 방법
SQLBot을 1.5.0 이상 버전으로 업데이트하고, 인증 및 접근 통제를 강화합니다.
🔧 검증 코드
로컬에서 SQLBot 서버가 실행 중이어야 하며, Python requests 라이브러리가 설치되어 있어야 합니다. 이 코드는 로컬 SQLBot 서버의 /api/v1/datasource/uploadExcel 엔드포인트에 대한 접근 가능성을 확인합니다.
import requests
response = requests.get('http://localhost:8080/api/v1/datasource/uploadExcel')
if response.status_code == 200:
print({"result": "취약", "reason": "엔드포인트에 접근 가능"})
else:
print({"result": "양호", "reason": "엔드포인트에 접근 불가"})