CVE-2026-32687

SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3

HIGH
7.8
CVSS Score
Published: May 12, 2026 at 02:18 PM UTC
Updated: July 24, 2026 at 03:33 PM UTC
2 products affected across 1 vendorPostgrexEcto Postgrex

Using postgrex by elixir-ecto?

Get instant alerts when new vulnerabilities affect postgrex - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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, from pkg:github/elixir-ecto/postgrex@266b530faf9bde094e31e0e4ab851f933fadc0f5 before 0.22.2.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

0.16.0 ≤ v < 0.22.00.16.0 ≤ v < 0.22.20.16.0266b530faf9bde094e31e0e4ab851f933fadc0f5
Vendor states this is fixed in 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 (fixed)
Affected range stops below 0.22.0, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.22.2, so it looks safe — our inference, not a vendor statement
0.16.0 ≤ v < 0.22.00.16.0 ≤ v < 0.22.20.16.0266b530faf9bde094e31e0e4ab851f933fadc0f5
Vendor states this is fixed in 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 (fixed)
Affected range stops below 0.22.0, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.22.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-89

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card