🇰🇷 한글 설명
Chartbrew 5.2.3 미만 버전에서 ClickHouse 프로토콜 사용 시 SQL 변수 처리 과정에서 백슬래시 이스케이프 옵션이 활성화되지 않는 취약점이 존재합니다. 공격자는 백슬래시를 이용해 SQL 쿼리 구조를 조작함으로써 임의의 ClickHouse SQL을 실행하고 데이터를 유출하거나 내부 자원에 접근할 수 있습니다.
💡 쉬운 설명
차트 생성 도구인 Chartbrew에서 데이터베이스 명령어를 처리할 때 특수 문자를 제대로 막지 못하는 보안 허점이 발견되었습니다. 이를 통해 해커가 몰래 데이터베이스에 명령을 내려 중요한 정보를 빼가거나 시스템에 침입할 수 있습니다.
🇺🇸 원문 (English)
Chartbrew is an open-source web application that can connect directly to databases and APIs and use the data to create charts. Prior to 5.2.3, Chartbrew's ClickHouse protocol in server/sources/plugins/clickhouse/clickhouse.protocol.js calls applySqlVariables() from server/sources/shared/sql/sql.variables.js without enabling the escapeBackslash option. For a ClickHouse-backed chart with variable binding, an attacker can supply a backslash before a quote so quote doubling does not keep the value within its intended SQL string literal. Public dashboards can expose this path without authentication, and successful exploitation can execute arbitrary ClickHouse SQL to disclose data or, when the database configuration permits, access files or internal network resources. This issue is fixed in version 5.2.3.
📍 영향받는 시스템
Chartbrew 5.2.3 미만 모든 버전
⚔️ 공격 벡터
공개된 대시보드의 변수 바인딩 기능에 백슬래시(\)를 포함한 특수 문자를 입력하여 SQL 인젝션 공격 수행
🛡️ 대응 방법
Chartbrew를 최신 보안 패치가 적용된 버전인 5.2.3 이상으로 업데이트
🔧 검증 코드
명령어 결과에 5.2.3 미만 버전의 Chartbrew가 출력되면 취약한 상태이며, 아무 결과도 나오지 않으면 안전합니다.
npm list -g chartbrew | grep -E 'chartbrew@([0-5]\.[0-5]\.[0-5])' | grep -v '5.2.3'
💻 영향받는 소프트웨어
IBM WebSphere Application Server