🔍 CVE-2026-32687

7.8
CVSS Score
HIGH
2026-05-12
2026-07-24 15:17
✅ 완료

🇰🇷 한글 설명

elixir-ecto postgrex의 'Elixir.Postgrex.Notifications' 모듈에서 발생하는 SQL 인젝션 취약점입니다. 'listen/3' 및 'unlisten/3' 함수에 전달되는 채널 인자가 큰따옴표로 적절히 이스케이프되지 않고 SQL 문에 직접 삽입되어, 공격자가 임의의 SQL 명령어를 실행할 수 있습니다. 특히 PostgreSQL의 단순 쿼리 프로토콜을 사용하여 DDL 및 DML 명령어를 체이닝할 수 있는 위험이 있습니다.

💡 쉬운 설명

데이터베이스에 알림을 요청할 때 사용하는 이름에 특수 문자를 섞어 넣으면, 공격자가 데이터베이스를 조작하거나 삭제할 수 있는 보안 구멍이 있습니다. 마치 이름표를 적는 칸에 명령어를 적어 시스템을 속이는 것과 같습니다.

🇺🇸 원문 (English)

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in elixir-ecto postgrex ('Elixir.Postgrex.Notifications' module) allows SQL Injection. The channel argument passed to 'Elixir.Postgrex.Notifications':listen/3 and 'Elixir.Postgrex.Notifications':unlisten/3 is interpolated directly into LISTEN "..." / UNLISTEN "..." SQL statements without escaping the " character. An attacker who can influence the channel name can inject a " to break out of the quoted identifier and append arbitrary SQL. Because the notifications connection uses the PostgreSQL simple query protocol, multi-statement payloads are accepted, allowing DDL and DML commands to be chained (e.g. ; DROP TABLE ...; --). The same unsanitized interpolation also occurs in handle_connect/1 when replaying LISTEN commands after a reconnect. This vulnerability is associated with program file lib/postgrex/notifications.ex and program routines 'Elixir.Postgrex.Notifications':listen/3, 'Elixir.Postgrex.Notifications':unlisten/3, 'Elixir.Postgrex.Notifications':handle_connect/1. This issue affects postgrex: from 0.16.0 before 0.22.2.

📍 영향받는 시스템

postgrex: 0.16.0 버전부터 0.22.2 미만 버전

⚔️ 공격 벡터

채널 이름을 제어할 수 있는 공격자가 큰따옴표(")를 사용하여 SQL 쿼리 구조를 깨뜨리고 임의의 SQL 명령어를 삽입

🛡️ 대응 방법

postgrex 라이브러리를 0.22.2 이상의 최신 버전으로 업데이트

🔧 검증 코드

출력된 postgrex의 버전이 0.22.2 미만인지 확인

Shell / Script
mix exec 'mix list deps | grep postgrex'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

PostgreSQL