CVE-2026-32687
published high CVSS 4.0 · 7.5SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| elixir-ecto | — | postgrex0.16.0 to < 0.22.2 · Other versions: unaffected | Affected | Not stated | EEF |
| elixir-ecto | — | elixir-ecto/postgrexpostgrex · 266b530faf9bde094e31e0e4ab851f933fadc0f5 to < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 · Other versions: unaffected | Affected | Not stated | EEF |
Description
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in elixir-ecto postgrex (Postgrex.Notifications module) allows SQL Injection. The channel argument passed to Postgrex.Notifications.listen/3 and 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 Postgrex.Notifications.listen/3, Postgrex.Notifications.unlisten/3, Postgrex.Notifications.handle_connect/1. This issue affects postgrex: from 0.16.0 before 0.22.2.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- EEF · cna
- Vector string
- CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| elixir-ecto | postgrex | 0.16.0 to < 0.22.2 (affected · semver)Default: unaffected | EEF · cna |
| elixir-ecto | postgrex | 266b530faf9bde094e31e0e4ab851f933fadc0f5 to < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 (affected · git)Default: unaffected | EEF · cna |
Weaknesses
1- CWE-89 CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
5- EEF CNA record for CVE-2026-32687 https://cna.erlef.org/cves/CVE-2026-32687.html
- Channel-name SQL injection in `Postgrex.Notifications.listen/3` https://github.com/elixir-ecto/ecto/security/advisories/GHSA-r73h-97w8-m54h
- Introducing commit 266b530 in elixir-ecto/postgrex https://github.com/elixir-ecto/postgrex/commit/266b530faf9bde094e31e0e4ab851f933fadc0f5
- Fix commit 7cdedbd in elixir-ecto/postgrex https://github.com/elixir-ecto/postgrex/commit/7cdedbd4316bb65f82e6a9a4f922c0ac491cb770
- OSV record EEF-CVE-2026-32687 https://osv.dev/vulnerability/EEF-CVE-2026-32687
Provider assertions
2EEF · cna
SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- cab00a390774c9d39aaef8ef415a3356bf66f6147ca2a3e26336b68e40b089fe
- Ingested
- 20 Nov 2026, 05:19:38 UTC
- Source record
- Official CVE record