Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/jackc/pgx/v4
  4. ›
  5. GHSA-j88v-2chj-qfwx

GHSA-j88v-2chj-qfwx: pgx: SQL Injection via placeholder confusion with dollar quoted string literals

April 22, 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

Code Behaviors & Features

Detect and mitigate GHSA-j88v-2chj-qfwx 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 up to 4.18.3

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/v4/GHSA-j88v-2chj-qfwx.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:16:57 +0000.