Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/jackc/pgx/v5
  4. ›
  5. CVE-2026-41889

CVE-2026-41889: pgx: SQL Injection via placeholder confusion with dollar quoted string literals

April 22, 2026 (updated May 13, 2026)

SQL Injection can occur when:

  1. The non-default simple protocol is used.
  2. A dollar quoted string literal is used in the SQL query.
  3. That string literal contains text that would be would be interpreted as a placeholder outside of a string literal.
  4. The value of that placeholder is controllable by the attacker.

e.g.

attackValue := `$tag$; drop table canary; --`
_, err = tx.Exec(ctx, `select $tag$ $1 $tag$, $1`, pgx.QueryExecModeSimpleProtocol, attackValue)

This is unlikely to occur outside of a contrived scenario.

References

  • github.com/advisories/GHSA-j88v-2chj-qfwx
  • github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da
  • github.com/jackc/pgx/releases/tag/v5.9.2
  • github.com/jackc/pgx/security/advisories/GHSA-j88v-2chj-qfwx
  • nvd.nist.gov/vuln/detail/CVE-2026-41889

Code Behaviors & Features

Detect and mitigate CVE-2026-41889 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 5.9.2

Fixed versions

  • 5.9.2

Solution

Upgrade to version 5.9.2 or above.

Impact 3.1 LOW

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

go/github.com/jackc/pgx/v5/CVE-2026-41889.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:14 +0000.