🔍 CVE-2016-10556

7.5
CVSS Score
HIGH
2018-05-29
2026-06-17 00:39
✅ 완료

🇰🇷 한글 설명

Sequelize ORM의 특정 버전에서 Postgres, SQLite, MSSQL 사용 시 배열을 문자열로 처리하고 부적절하게 이스케이프하는 취약점이 발견되었습니다. 공격자가 조작된 배열을 입력하면 SQL 인젝션이 발생하여 데이터베이스의 데이터를 삭제하거나 조작할 수 있습니다.

💡 쉬운 설명

데이터베이스를 다루는 도구인 Sequelize가 사용자가 입력한 목록을 처리할 때 보안 검사를 제대로 하지 못하는 문제입니다. 이를 통해 해커가 데이터베이스에 몰래 명령어를 입력하여 중요한 데이터를 지울 수 있습니다.

🇺🇸 원문 (English)

sequelize is an Object-relational mapping, or a middleman to convert things from Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server into usable data for NodeJS In Postgres, SQLite, and Microsoft SQL Server there is an issue where arrays are treated as strings and improperly escaped. This causes potential SQL injection in sequelize 3.19.3 and earlier, where a malicious user could put `["test", "'); DELETE TestTable WHERE Id = 1 --')"]` inside of ``` database.query('SELECT * FROM TestTable WHERE Name IN (:names)', { replacements: { names: directCopyOfUserInput } }); ``` and cause the SQL statement to become `SELECT Id FROM Table WHERE Name IN ('test', '\'); DELETE TestTable WHERE Id = 1 --')`. In Postgres, MSSQL, and SQLite, the backslash has no special meaning. This causes the the statement to delete whichever Id has a value of 1 in the TestTable table.

📍 영향받는 시스템

Sequelize 3.19.3 및 그 이전 버전 (Postgres, SQLite, MSSQL 사용 시)

⚔️ 공격 벡터

조작된 배열 데이터를 입력값으로 전달하여 SQL 쿼리문을 변조하는 SQL Injection 공격

🛡️ 대응 방법

Sequelize를 최신 버전으로 업데이트하여 배열 처리 시 이스케이프 로직을 개선해야 합니다.

🔧 검증 코드

출력된 Sequelize의 버전이 3.19.3 이하인지 확인합니다.

Shell / Script
npm list sequelize | grep sequelize

📊 CVSS Vector String

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

MariaDB