Skip to content

sec(deps): bump pgx/v5 to v5.9.2 to clear GO-2026-5004 govulncheck advisory #1285

Closed

Description

@cristim

The Security Scanning CI gate has been failing on main since at least 2026-06-26 with:

```
Vulnerability #1: GO-2026-5004
SQL Injection via placeholder confusion with dollar quoted string literals
in github.com/jackc/pgx
Module: github.com/jackc/pgx/v5
Found in: github.com/jackc/pgx/v5@v5.8.0
Fixed in: github.com/jackc/pgx/v5@v5.9.2
Example traces found:
#1: internal/database/connection.go:353:25: database.Connection.ReleaseAdvisoryLock
calls pgxpool.Conn.QueryRow, which eventually calls sanitize.SanitizeSQL
```

govulncheck classifies this as a real call-graph hit (not just an import) because
`database.Connection.ReleaseAdvisoryLock` reaches `sanitize.SanitizeSQL` through
`pgxpool.Conn.QueryRow`. We don't pass attacker-controlled SQL into that path
(the only argument is a deterministic int64 lock key), so this is unlikely
exploitable in CUDly today, but it keeps the Security Scanning gate red on every
PR -- which is itself a problem (real future findings drown in the noise).

Fix

Bump `github.com/jackc/pgx/v5` from v5.8.0 to v5.9.2 in the root `go.mod` and
re-run `go mod tidy`. Verify with:

```bash
go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
for mod in . pkg providers/aws providers/azure providers/gcp tests/e2e; do
echo "==> govulncheck in $mod"
(cd "$mod" && govulncheck ./...)
done
```

Out of scope here

The Security Scanning CI gate also runs across the per-cloud submodules; check
each one for the same advisory after the root bump and lift versions in sync if
needed (PR #1277 surfaced this; the lint-flood issue is tracked separately in
#1223).

Activity

  1. cristim commented on Jul 27, 2026

    @cristim
    MemberAuthor

    Verification sweep against main (101f099fb) on 2026-07-27 finds this already resolved.
    go.mod now pins github.com/jackc/pgx/v5 to v5.9.2, which clears GO-2026-5004; pgx is only used in the root module.
    Evidence: merged commit f2ce456; go.mod:108.
    Recommending close. Reopen if the vulnerability resurfaces in a future pgx release.

  2. cristim commented on Sep 2, 2026

    @cristim
    MemberAuthor

    Verified resolved at 3c0f8ac: the root module requires github.com/jackc/pgx/v5 v5.9.2, the version that fixes GO-2026-5004, and the govulncheck step in Security Scanning passes on main. Evidence: go.mod:109 (commit f2ce456, #1343). Residual axes checked: pkg, providers/aws, providers/azure, providers/gcp and tests/e2e go.mod files do not require pgx. Closing as completed; reopen if the behaviour recurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions