# CVE-2026-32687: SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3

- Severity: High 7.5 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2026-05-12T14:18:07.607Z
- Modified: 2026-11-25T17:23:05.730Z
- Also known as: GHSA-r73h-97w8-m54h, EEF-CVE-2026-32687
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- postgrex: from 0.16.0 before 0.22.2
- elixir-ecto/postgrex: from 266b530faf9bde094e31e0e4ab851f933fadc0f5 before 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770
- postgrex (Hex): from 0.16.0 before 0.22.2
- https://github.com/elixir-ecto/postgrex: from 266b530faf9bde094e31e0e4ab851f933fadc0f5 before 7cdedbd4316bb65f82e6a9a4f922c0ac491cb770
- elixir-ecto postgrex: from 0.16.0 before 0.22.0

## Every score

- EEF: CVSS:4.0 7.5 High `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`
- GitHub: CVSS:4.0 High `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/elixir-ecto/ecto/security/advisories/GHSA-r73h-97w8-m54h> (advisory, related, vendor-advisory, web)
- <https://cna.erlef.org/cves/CVE-2026-32687.html> (related, third-party-advisory, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-32687> (related, third-party-advisory, web)
- <https://github.com/elixir-ecto/postgrex/commit/266b530faf9bde094e31e0e4ab851f933fadc0f5> (related, web)
- <https://github.com/elixir-ecto/postgrex/commit/7cdedbd4316bb65f82e6a9a4f922c0ac491cb770> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-32687> (advisory)
- <https://github.com/elixir-ecto/ecto> (package)
- <https://hex.pm/packages/postgrex> (package)

## Sources

- CVE List: [CVE-2026-32687](https://www.cve.org/CVERecord?id=CVE-2026-32687), CVE Terms of Use, modified 2026-11-20
- GitHub Advisory Database: [GHSA-r73h-97w8-m54h](https://github.com/advisories/GHSA-r73h-97w8-m54h), CC-BY-4.0, modified 2026-05-18
- Erlang Ecosystem Foundation: [EEF-CVE-2026-32687](https://osv.dev/vulnerability/EEF-CVE-2026-32687), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-32687](https://nvd.nist.gov/vuln/detail/CVE-2026-32687), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-32687 · Whole record: https://cve.day/CVE-2026-32687.json · Rebuilt by cve.day 2026-11-25T22:59:21.356Z
