{"identifier":"CVE-2026-66838","cve":{"id":"CVE-2026-66838","description":"Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in elixir-ecto postgrex allows SQL Injection via the :comment option of Postgrex.stream/4. An attacker who can influence that value can close the comment delimiter with */ and extend the streamed statement with their own clauses, which execute under the connection's role. Ecto exposes the same option through Ecto.Repo.stream/2.\n\nPostgrex appends the comment by concatenating it into the statement text sent in the Parse message, without escaping or rejecting */. The option is validated by comment_not_present!/1 at every other execution point; stream/4 never calls it. Because Parse accepts a single command, the injection is confined to the streamed statement and further statements cannot be chained.\n\nThis issue affects postgrex: from 0.19.3 before 0.22.4.","published":"2026-08-07T13:16:52.960000+00:00","modified":"2026-11-20T06:17:36.523000+00:00","status":"Modified","score":5.9,"severity":"MEDIUM","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_version":"4.0","affected":[{"criteria":"cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*","versionStartIncluding":"0.19.3","versionStartExcluding":"","versionEndIncluding":"","versionEndExcluding":"0.22.4"}],"weaknesses":["CWE-89"],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-66838.html","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/elixir-ecto/ecto/security/advisories/GHSA-3gww-3f36-2388","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Exploit","Patch","Vendor Advisory"]},{"url":"https://github.com/elixir-ecto/postgrex/commit/4011be852c99dc61ddb98cb01aa41e8775a0e3dd","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Patch"]},{"url":"https://github.com/elixir-ecto/postgrex/commit/4971a2722fa72f8e1b54a2c403cad4c43916e36d","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"},{"url":"https://github.com/elixir-ecto/postgrex/commit/e1ecba618ddea4cee2556bd6ad9b6285e05f9d3c","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Patch"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66838","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/elixir-ecto/ecto/security/advisories/GHSA-3gww-3f36-2388","source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","tags":["Exploit","Patch","Vendor Advisory"]}],"kev":null,"kev_checked":true,"metrics":{"cvssMetricV40":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","cvssData":{"version":"4.0","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"LOW","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","baseScore":8.2,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"LOW","availabilityImpact":"NONE"},"exploitabilityScore":3.9,"impactScore":4.2}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-08-07T15:11:28.060095Z","id":"CVE-2026-66838","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:elixir-ecto:postgrex:*:*:*:*:*:*:*:*","versionStartIncluding":"0.19.3","versionEndExcluding":"0.22.4","matchCriteriaId":"15B08735-414F-4252-9357-F1CA4081CAF5"}]}]}],"source":"nvd","retrieved_at":"2026-11-20T09:48:23.887099+00:00","exploited":false,"kev_stale":false,"products":["elixir-ecto / postgrex"],"priority":{"label":"Assess exposure and vendor guidance","reasons":["No higher-priority signal is available in the current stored evidence."]},"epss":{"probability":0.00346,"percentile":0.30141,"date":"2026-12-04","stale":false},"version_assessment":null},"news":[],"campaigns":[],"domains":[{"domain":"cna.erlef.org","source_url":"https://cna.erlef.org/cves/CVE-2026-66838.html","investigate_url":"https://investigate.aeglixmind.com/#cna.erlef.org"},{"domain":"github.com","source_url":"https://github.com/elixir-ecto/ecto/security/advisories/GHSA-3gww-3f36-2388","investigate_url":"https://investigate.aeglixmind.com/#github.com"},{"domain":"osv.dev","source_url":"https://osv.dev/vulnerability/EEF-CVE-2026-66838","investigate_url":"https://investigate.aeglixmind.com/#osv.dev"}],"arsenal_url":"https://arsenal.aeglixmind.com/?cve=CVE-2026-66838","catalog_url":"https://cves.aeglixmind.com/cve/CVE-2026-66838","research_url":"https://investigate.aeglixmind.com/research/cve/CVE-2026-66838","coverage":{"news_candidates_checked":0,"campaign_candidates_checked":0,"bounded":false,"notice":"Exact CVE mentions in stored public excerpts and reviewed campaign content only. A mention is not proof of exploitation, attribution or tool suitability. Missing matches do not establish absence."}}