🇰🇷 한글 설명
Tianji 오픈소스 분석 플랫폼의 getDateQuery() 함수에서 타임존 요청 값을 매개변수 바인딩 없이 SQL에 직접 삽입하여 SQL 인젝션 취약점이 발생합니다. 인증된 워크스페이스 구성원이라면 HTTP 헤더나 요청 데이터를 통해 임의의 SQL을 실행할 수 있으며, 이를 통해 데이터 유출, 수정 또는 서비스 거부가 가능합니다.
💡 쉬운 설명
서비스의 시간 설정 값을 조작하여 데이터베이스에 몰래 명령어를 입력할 수 있는 보안 약점입니다. 이를 통해 해커가 중요한 비밀번호를 훔쳐보거나 시스템을 망가뜨릴 수 있습니다.
🇺🇸 원문 (English)
Tianji is an open source analytics, uptime monitoring, and server status platform. Prior to 1.31.29, the getDateQuery() function in src/server/utils/prisma.ts constructs raw SQL through Prisma.sql() by interpolating the timezone request value without parameter binding. The timezone value can reach affected analytics queries through request data or the timezone HTTP header, and workspaceProcedure permits any authenticated workspace member, including a read-only viewer, to reach those queries. An attacker can execute arbitrary SQL against the shared PostgreSQL database, which can disclose or modify credentials, API keys, and tenant data or make the service unavailable. This issue is fixed in version 1.31.29.
📍 영향받는 시스템
Tianji platform versions prior to 1.31.29
⚔️ 공격 벡터
인증된 사용자가 HTTP 헤더 또는 요청 데이터의 타임존 값을 조작하여 SQL 인젝션 공격 수행
🛡️ 대응 방법
Tianji를 최신 버전인 1.31.29 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 1.31.29보다 낮으면 취약한 상태입니다.
npm list -g tianji 2>/dev/null | grep -E 'tianji@([0-9]+\.[0-9]+\.[0-9]+)'