{"answers":{"affected":"3 open source packages ship an affected version, including postgrex. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-32687 in the wild and no public exploit code.","fix":"Upgrade postgrex to 0.22.2 or later.","what":"CVE-2026-32687 is a high-severity SQL injection vulnerability in elixir-ecto postgrex, published on 12 May 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-32687 and fix it if it is affected.\n\nWhat it is: CVE-2026-32687 is a high-severity SQL injection vulnerability in elixir-ecto postgrex, published on 12 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-32687 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- postgrex (Hex): affected from 0.16.0; fixed in 0.22.2\n- postgrex (Hex): affected from 0.16.0; fixed in 0.22.2\n- postgrex (Hex): affected from 0.16.0; fixed in 0.22.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-32687/ (Markdown: https://insights.sbomify.com/CVE-2026-32687/index.md)","id":"CVE-2026-32687","markdown":"https://insights.sbomify.com/CVE-2026-32687/index.md","name":"CVE-2026-32687","record":{"aliases":["EEF-CVE-2026-32687","GHSA-r73h-97w8-m54h"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Elixir Postgrex library","requires_auth":"none","summary":"Attackers can execute arbitrary SQL commands by injecting quotes into channel names in Postgrex notification functions, risking data modification or execution.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"EEF","cpe":[{"product":"postgrex","vendor":"elixir-ecto"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"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.\n\nThe 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.\n\nThis 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.\n\nThis issue affects postgrex: from 0.16.0 before 0.22.2.","ecosystems":["Hex"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"SQL injection via channel name in Postgrex.Notifications.listen/3 and unlisten/3","id":"CVE-2026-32687","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Hex","product":null,"products":[],"type":"sql_injection","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Atom table exhaustion via HTTP/2 :scheme pseudo-header in plug_cowboy","id":"CVE-2026-32688"},"packages":[{"ecosystem":"Hex","fixed":["0.22.2"],"introduced":["0.16.0"],"last_affected":[],"package":"postgrex","purl":"pkg:hex/postgrex","source":"EEF-CVE-2026-32687"},{"ecosystem":"Hex","fixed":["0.22.2"],"introduced":["0.16.0"],"last_affected":[],"package":"postgrex","purl":null,"source":"GHSA-r73h-97w8-m54h"},{"ecosystem":"Hex","fixed":["0.22.2"],"introduced":["0.16.0"],"last_affected":[],"package":"postgrex","purl":"pkg:hex/postgrex","source":"GHSA-r73h-97w8-m54h"}],"prev":{"headline":"Unbounded exponent in decimal enables unauthenticated DoS","id":"CVE-2026-32686"},"products":["postgrex"],"published":"2026-05-12","related":[{"cvss_score":5.9,"headline":"SQL injection via the :comment option in Postgrex.stream/4","id":"CVE-2026-66838","kev_date_added":null,"published":"2026-08-07"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Erlang Ecosystem Foundation","prefix":"EEF"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-24","vendors":["elixir-ecto"]},"summary":"Attackers can execute arbitrary SQL commands by injecting quotes into channel names in Postgrex notification functions, risking data modification or execution.","url":"https://insights.sbomify.com/CVE-2026-32687/"}