🇰🇷 한글 설명
SQLBot 1.7.0 미만 버전에서 발생하는 SSRF 취약점으로, 공격자가 임의의 시스템 및 애플리케이션 파일을 탈취할 수 있습니다. 공격자는 조작된 MySQL 데이터 소스 설정을 통해 서버가 로컬 파일을 읽어 공격자에게 전송하도록 유도할 수 있습니다.
💡 쉬운 설명
해커가 가짜 데이터베이스 연결을 요청하여 서버 안에 있는 중요한 비밀 파일들을 몰래 읽어갈 수 있는 보안 약점입니다. 마치 서버에게 '이 파일을 읽어서 나에게 보내줘'라고 속이는 것과 같습니다.
🇺🇸 원문 (English)
SQLBot is an intelligent data query system based on a large language model and RAG. Versions prior to 1.7.0 contain a Server-Side Request Forgery (SSRF) vulnerability that allows an attacker to retrieve arbitrary system and application files from the server. An attacker can exploit the /api/v1/datasource/check endpoint by configuring a forged MySQL data source with a malicious parameter extraJdbc="local_infile=1". When the SQLBot backend attempts to verify the connectivity of this data source, an attacker-controlled Rogue MySQL server issues a malicious LOAD DATA LOCAL INFILE command during the MySQL handshake. This forces the target server to read arbitrary files from its local filesystem (such as /etc/passwd or configuration files) and transmit the contents back to the attacker. This issue was fixed in version 1.7.0.
📍 영향받는 시스템
SQLBot 1.7.0 미만 모든 버전
⚔️ 공격 벡터
/api/v1/datasource/check 엔드포인트에 조작된 MySQL 데이터 소스 파라미터를 전송하여 공격
🛡️ 대응 방법
SQLBot을 최신 버전인 1.7.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Version이 1.7.0 미만이면 취약한 상태이며, 1.7.0 이상이면 안전합니다.
pip show sqlbot 2>/dev/null | grep -E 'Version'