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

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

April 22, 2026 (updated April 30, 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
  • 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. Learn more about Dependency Scanning →

Affected versions

All versions up to 3.6.2

Solution

Unfortunately, there is no solution available yet.

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/CVE-2026-41889.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 09 May 2026 12:19:56 +0000.