CVE-2024-27304: GO-2024-2606 - SQL injection in github.com/jackc/pgproto3 and github.com/jackc/pgx

CVE-2024-27304 · Severity: low · CVSS 3.1 · Published 2024-03-14

SQL injection in github.com/jackc/pgproto3 and github.com/jackc/pgx

Technologies: github.com/jackc/pgproto3/v2 (Go), github.com/jackc/pgx (Go), github.com/jackc/pgx/v4 (Go), github.com/jackc/pgx/v5 (Go). Vendors: Go.

Quick answers

Is CVE-2024-27304 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-27304 being exploited in the wild.
How severe is CVE-2024-27304?
Low severity, with a CVSS score of 3.1, published 14 March 2024.
Which products and versions are affected?
github.com/jackc/pgproto3 (Go) SEMVER:introduced=0,fixed=2.3.3; github.com/jackc/pgproto3/v2 (Go) SEMVER:introduced=0,fixed=2.3.3; github.com/jackc/pgx (Go) SEMVER:introduced=0, SEMVER:introduced=0,fixed=4.18.2; github.com/jackc/pgx/v4 (Go) SEMVER:introduced=0,fixed=4.18.2; and 1 more.
Is there a fix for CVE-2024-27304?
Yes. github.com/jackc/pgproto3 (Go): upgrade to 2.3.3 or later; github.com/jackc/pgproto3/v2 (Go): upgrade to 2.3.3 or later; github.com/jackc/pgx (Go): upgrade to 4.18.2 or later; github.com/jackc/pgx/v4 (Go): upgrade to 4.18.2 or later; github.com/jackc/pgx/v5 (Go): upgrade to 5.5.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2024-27304?
Check whether you run github.com/jackc/pgproto3 (Go), github.com/jackc/pgproto3/v2 (Go), github.com/jackc/pgx (Go) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/jackc/pgproto3 (Go): upgrade to 2.3.3 or later
    go get github.com/jackc/pgproto3@v2.3.3
  • github.com/jackc/pgproto3/v2 (Go): upgrade to 2.3.3 or later
    go get github.com/jackc/pgproto3/v2@v2.3.3
  • github.com/jackc/pgx (Go): upgrade to 4.18.2 or later
    go get github.com/jackc/pgx@v4.18.2
  • github.com/jackc/pgx/v4 (Go): upgrade to 4.18.2 or later
    go get github.com/jackc/pgx/v4@v4.18.2
  • github.com/jackc/pgx/v5 (Go): upgrade to 5.5.4 or later
    go get github.com/jackc/pgx/v5@v5.5.4

Affected products

  • github.com/jackc/pgproto3 (Go) SEMVER:introduced=0,fixed=2.3.3
  • github.com/jackc/pgproto3/v2 (Go) SEMVER:introduced=0,fixed=2.3.3
  • github.com/jackc/pgx (Go) SEMVER:introduced=0, SEMVER:introduced=0,fixed=4.18.2
  • github.com/jackc/pgx/v4 (Go) SEMVER:introduced=0,fixed=4.18.2
  • github.com/jackc/pgx/v5 (Go) SEMVER:introduced=5.0.0,fixed=5.5.4

Identifiers

  • CVE-2024-27304
  • GHSA-7jwh-3vrq-q3m8
  • GHSA-mrww-27vc-gghv
  • GO-2024-2606

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.