Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

GHSA-j88v-2chj-qfwx

GHSA-j88v-2chj-qfwx is a security vulnerability in github.com/jackc/pgx/v5. O3 Security confirms whether GHSA-j88v-2chj-qfwx is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

pgx: SQL Injection via placeholder confusion with dollar quoted string literals

Also known asCVE-2026-41889GO-2026-5004
Published
Apr 22, 2026
Updated
Jun 25, 2026
Affected
3 pkgs
Patched
1 / 3
Exploits
None indexed

Blast Radius

3 pkgs affected
🐹github.com/jackc/pgx/v5🐹github.com/jackc/pgx/v4🐹github.com/jackc/pgx

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Impact

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.

Patches

The problem is resolved in v5.9.2.

Workarounds

Do not use the simple protocol to execute queries matching all the above conditions.

Affected Packages

3 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/jackc/pgx/v5all versions5.9.2
🐹Gogithub.com/jackc/pgx/v4all versionsNo fix
🐹Gogithub.com/jackc/pgxall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/jackc/pgx/v5. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update github.com/jackc/pgx/v5 to 5.9.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-j88v-2chj-qfwx is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-j88v-2chj-qfwx is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-j88v-2chj-qfwx. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact 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. ```go 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. ### Patches The problem is resolved in v5.9.2.
O3 Security · Impact-Aware SCA

Is GHSA-j88v-2chj-qfwx in your dependencies?

O3 detects GHSA-j88v-2chj-qfwx across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.