CVE-2026-32687: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in elixir-ecto postgrex
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.
AI Analysis
Technical Summary
The vulnerability in elixir-ecto postgrex (CVE-2026-32687) involves improper neutralization of special elements in SQL commands, leading to SQL Injection. The channel argument in Elixir.Postgrex.Notifications' listen/3, unlisten/3, and handle_connect/1 functions is interpolated directly into LISTEN and UNLISTEN SQL statements without escaping the double quote character. This enables an attacker controlling the channel name to break out of the quoted identifier and append arbitrary SQL commands. Because the notifications connection uses the PostgreSQL simple query protocol, multi-statement payloads are accepted, allowing chaining of DDL and DML commands such as DROP TABLE. The issue affects postgrex versions starting from 0.16.0 before 0.22.2.
Potential Impact
An attacker able to influence the channel name parameter can execute arbitrary SQL commands on the PostgreSQL database via the notifications connection. This can lead to unauthorized data manipulation or destruction, including dropping tables or modifying data. The vulnerability has a high severity with a CVSS 4.0 score of 7.5, reflecting the potential for significant impact on confidentiality, integrity, and availability of the database.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch link is provided in the available data. Until a patch is available, avoid passing untrusted input to the channel argument of listen/3 and unlisten/3 functions. Implement input validation or sanitization on channel names to prevent injection of special characters, especially the double quote ("). Monitor vendor channels for updates and apply official fixes once released.
CVE-2026-32687: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in elixir-ecto postgrex
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.
CVSS v4.0
Score 7.5high
Affected software
pkg:github/elixir-ecto/postgrexRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in elixir-ecto postgrex (CVE-2026-32687) involves improper neutralization of special elements in SQL commands, leading to SQL Injection. The channel argument in Elixir.Postgrex.Notifications' listen/3, unlisten/3, and handle_connect/1 functions is interpolated directly into LISTEN and UNLISTEN SQL statements without escaping the double quote character. This enables an attacker controlling the channel name to break out of the quoted identifier and append arbitrary SQL commands. Because the notifications connection uses the PostgreSQL simple query protocol, multi-statement payloads are accepted, allowing chaining of DDL and DML commands such as DROP TABLE. The issue affects postgrex versions starting from 0.16.0 before 0.22.2.
Potential Impact
An attacker able to influence the channel name parameter can execute arbitrary SQL commands on the PostgreSQL database via the notifications connection. This can lead to unauthorized data manipulation or destruction, including dropping tables or modifying data. The vulnerability has a high severity with a CVSS 4.0 score of 7.5, reflecting the potential for significant impact on confidentiality, integrity, and availability of the database.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch link is provided in the available data. Until a patch is available, avoid passing untrusted input to the channel argument of listen/3 and unlisten/3 functions. Implement input validation or sanitization on channel names to prevent injection of special characters, especially the double quote ("). Monitor vendor channels for updates and apply official fixes once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-03-13T09:12:14.475Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0341f2cbff5d8610f8ff7d
Added to database: 05/12/2026, 15:06:26 UTC
Last enriched: 07/24/2026, 21:34:37 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 91
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.