postgrex
PostgreSQL driver for Elixir
Activity
- Latest release
- Jul 09, 2026
- Total releases
- 76
- Cadence
- ~2 months
- Last 12 months
- 5
Reach
- Stars
- 1.2k
Details
- License
- Apache-2.0
- First release
- Apr 22, 2014
| Version | Released | |
|---|---|---|
0.22.3
patch
| ||
0.22.2
patch
1 CVE
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev | ||
0.22.1
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.22.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.21.1
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.21.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.20.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.19.3
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.19.2
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.19.1
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.19.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.18.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.17.5
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.17.4
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.17.3
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.17.2
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.17.1
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.17.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.16.5
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.16.4
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.16.3
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.16.2
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.16.1
patch
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.16.0
minor
2 CVEs
CVE-2026-58225
EEF-CVE-2026-58225
GHSA-4mw9-4qgj-m97w
Jul 10, 2026
SQL injection via unescaped dollar-quote in Postgrex.Notifications reconnect replay causes notification denial of service
Medium
Local
Low
None
None
SummarySQL Injection vulnerability in elixir-ecto postgrex allows an attacker who can influence a LISTEN channel name to inject SQL into the reconnect replay query, causing a denial of service of the notification connection. Postgrex.Notifications sanitizes channel names with quote_channel/1, which doubles double quotes so the name is safe inside a double-quoted identifier. This protects the single-statement LISTEN and UNLISTEN paths. On every (re)connect, however, handle_connect/1 replays all registered channels at once by concatenating their LISTEN statements and wrapping them in a dollar-quoted anonymous code block (DO $$BEGIN ... END$$). quote_channel/1 does not escape the $$ dollar-quote delimiter that opens and closes this block. The listen/3 guards only reject null bytes and names longer than 63 bytes, so a channel name containing $$ passes validation unchanged. Once such a name is embedded, its $$ prematurely terminates the outer dollar-quoted string and PostgreSQL parses the remainder as additional top-level statements. Because handle_connect/1 runs on every (re)connect, the malformed replay query is rejected each time and the notification connection never re-establishes its subscriptions, silently dropping notifications for every channel sharing that connection. An application is affected when it passes untrusted input (for example a tenant or user identifier) as a channel name to Postgrex.Notifications.listen/3. The double-quote doubling prevents forming a fully valid injected statement, so arbitrary SQL execution is not possible, but the corrupted query reliably breaks the shared notification connection for all tenants, resulting in denial of service. This issue affects postgrex: from 0.16.0 before 0.22.3. WorkaroundValidate channel names before passing untrusted input to Postgrex.Notifications.listen/3. Reject any name that contains the dollar-quote delimiter ($$), or restrict channel names to a safe character set such as alphanumeric characters and underscores. Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 11 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
0.22.2
Fixed in
0.22.3
References Updated Jul 10, 2026 · Source: OSV.dev
CVE-2026-32687
GHSA-r73h-97w8-m54h
EEF-CVE-2026-32687
May 18, 2026
Postgrex: Channel-name SQL injection in `Postgrex.Notifications.listen/3`
High
Local
Low
None
None
SummarySQL injection in Only those using the DetailsPostgreSQL escapes a The notifications connection runs as whatever DB role the app is configured with. Unlike the ImpactSQL injection on the notifications connection. Affects any application that calls FixUpgrade to latest Postgrex v0.22.2 or later. Altenratively, sanitize any user input given as channel name by making sure it doesn't include quotes as well as null bytes (not strictly required, but recommended):
Affected versions
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
+ 10 more Show less
0.18.0
0.19.0
0.19.1
0.19.2
0.19.3
0.20.0
0.21.0
0.21.1
0.22.0
0.22.1
Fixed in
0.22.2
References
Updated May 18, 2026 · Source: OSV.dev | ||
0.15.13
patch
| ||
0.15.12
patch
| ||
0.15.11
patch
| ||
0.15.10
patch
| ||
0.15.9
patch
| ||
0.15.8
patch
| ||
0.15.7
patch
| ||
0.15.6
patch
| ||
0.15.5
patch
| ||
0.15.4
patch
| ||
0.15.3
patch
| ||
0.15.2
patch
| ||
0.15.1
patch
| ||
0.15.0
minor
| ||
0.14.3
patch
| ||
0.14.2
patch
| ||
0.14.1
patch
| ||
0.14.0
minor
| ||
0.14.0-rc.1
pre
| ||
0.14.0-rc.0
pre
| ||
0.13.5
patch
| ||
0.13.4
patch
| ||
0.12.2
patch
| ||
0.13.3
patch
| ||
0.13.2
patch
| ||
0.13.1
patch
|