CVE-2026-32687
SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3
Mitigation
- Upgrade postgrex to 0.22.2 or later.
- Upgrade postgrex to 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 or later.
Who should check
- Anyone running elixir-ecto postgrex >= 0.16.0, < 0.22.2
- Anyone running elixir-ecto postgrex >= 266b530faf9bde094e31e0e4ab851f933fadc0f5, < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770
Vulnerability facts
- Affected
- elixir-ecto postgrex >= 0.16.0, < 0.22.2; elixir-ecto postgrex >= 266b530faf9bde094e31e0e4ab851f933fadc0f5, < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770
- Fixed in
- elixir-ecto postgrex 0.22.2, elixir-ecto postgrex 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.5 (v4.0, CNA)CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.22% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- CWE
- CWE-89
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| elixir-ecto postgrex | >= 0.16.0, < 0.22.2 | — | cvelist |
| elixir-ecto postgrex | >= 266b530faf9bde094e31e0e4ab851f933fadc0f5, < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-32687. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-32687.md Affected: elixir-ecto postgrex >= 0.16.0, < 0.22.2; elixir-ecto postgrex >= 266b530faf9bde094e31e0e4ab851f933fadc0f5, < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 Fixed in: elixir-ecto postgrex 0.22.2, elixir-ecto postgrex 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 Steps: 1. Search this machine and project for elixir-ecto postgrex: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
FAQ
Is CVE-2026-32687 being exploited?
There is no confirmed exploitation: CVE-2026-32687 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-32687?
High: CVSS 7.5 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-32687?
elixir-ecto postgrex >= 0.16.0, < 0.22.2; elixir-ecto postgrex >= 266b530faf9bde094e31e0e4ab851f933fadc0f5, < 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770.
Is there a fix for CVE-2026-32687?
Yes. Fixed in elixir-ecto postgrex 0.22.2, elixir-ecto postgrex 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770. Upgrade postgrex to 0.22.2 or later. Upgrade postgrex to 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770 or later.
How do I check if I'm affected by CVE-2026-32687?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.