🇰🇷 한글 설명
MariaDB Connector/Node.js의 특정 클라이언트 문자셋(big5, gbk 등) 사용 시 SQL 인젝션 취약점이 존재합니다. 공격자가 제어하는 Buffer 파라미터가 클라이언트 측에서 적절히 이스케이프되지 않아 SQL 쿼리 구조를 조작할 수 있습니다. 이로 인해 데이터베이스의 데이터를 노출하거나 수정할 수 있는 위험이 있습니다.
💡 쉬운 설명
특정 언어 설정(중국어 등)을 사용할 때 데이터베이스에 명령어를 몰래 끼워 넣을 수 있는 보안 구멍이 발견되었습니다. 해커가 이 구멍을 이용하면 데이터베이스에 저장된 중요한 정보를 훔치거나 마음대로 바꿀 수 있습니다.
🇺🇸 원문 (English)
MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. Prior to 3.2.4, 3.3.3, 3.4.6, and 3.5.3, MariaDB Connector/Node.js permits SQL injection when attacker-controlled Buffer parameters are escaped client-side under the big5, gbk, sjis, cp932, or gb18030 client character sets. PacketOutputStream.writeBufferEscape in lib/io/packet-output-stream.js escaped bytes without the charset-aware getMbRecognizer logic in lib/misc/charset-mb.js. The server SQL lexer runs my_ismbchar before escape processing, so an attacker-controlled lead byte can consume the inserted 0x5C backslash as a multibyte trail byte and leave the following 0x27 quote unescaped, terminating the string literal and allowing arbitrary SQL. The default utf8mb4 character set and parameters sent through the execute binary prepared-statement path are not affected. Successful exploitation can expose or modify data available to the database account. This issue is fixed in versions 3.2.4, 3.3.3, 3.4.6, and 3.5.3.
📍 영향받는 시스템
MariaDB Connector/Node.js versions prior to 3.2.4, 3.3.3, 3.4.6, and 3.5.3
⚔️ 공격 벡터
특정 멀티바이트 문자셋(big5, gbk, sjis, cp932, gb18030) 환경에서 조작된 Buffer 파라미터를 통한 SQL Injection
🛡️ 대응 방법
MariaDB Connector/Node.js를 최신 패치 버전(3.2.4, 3.3.3, 3.4.6 또는 3.5.3 이상)으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 취약한 버전(3.2.4, 3.3.3, 3.4.6, 3.5.3 미만)인지 확인하십시오.
npm list mariadb-connector-nodejs
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server