Injection SQL dans postgrex (CVE-2026-32687)
Résumé
Injection SQL dans postgrex (CVE-2026-32687). L'exploitation peut entraîner la prise de contrôle totale du système. Atténuation : mise à jour vers 0.22.2 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
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.
Configurations
The application must call 'Elixir.Postgrex.Notifications':listen/3 or 'Elixir.Postgrex.Notifications':unlisten/3 with a channel name derived from untrusted user input.
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-32687 a été découverte dans postgrex.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 7.8/10.
Action : mettez à jour postgrex vers 0.22.2 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « postgrex CVE-2026-32687 » sur le site de l'éditeur.
CVE-2026-32687 (postgrex) — CWE-89 / CVSS v3 7.8
Vecteur d'attaque : local / sans interaction utilisateur
Correctif : 0.22.2 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une injection SQL (CWE-89) affecte postgrex.
Consultez l'avis de l'éditeur pour les versions affectées de postgrex.
Gravité : Élevée (CVSS 7.8/10). L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers 0.22.2.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'postgrex' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
postgrexを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade postgrex to 0.22.2ステージング環境で 0.22.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory github.com
- advisory osv.dev
- advisory nvd.nist.gov
- package github.com
- package hex.pm
- patch github.com
- web cna.erlef.org
- web github.com