CVE-2024-27304

Critical

Description

pgx is a PostgreSQL driver and toolkit for Go. SQL injection can occur if an attacker can cause a single query or bind message to exceed 4 GB in size. An integer overflow in the calculated message size can cause the one large message to be sent as multiple messages under the attacker's control. The problem is resolved in v4.18.2 and v5.5.4. As a workaround, reject user input large enough to cause a single query or bind message to exceed 4 GB in size.

SeverityCritical
CVSS9.8
Exploit probability—
ProductJackc Pgproto3
PublishedMar 6, 2024
First seenMar 6, 2024

How to fix

Update
  • jackc pgproto32.3.3 or later
  • jackc pgx4.18.2, 5.5.4 or later
  • github.com/jackc/pgproto32.3.3 or later
  • github.com/jackc/pgproto3/v22.3.3 or later
  • github.com/jackc/pgx4.18.2, 5.5.4 or later
  • github.com/jackc/pgx/v44.18.2 or later
  • github.com/jackc/pgx/v55.5.4 or later

Affected products

ProductAffected versionsFixed in
jackc pgproto3v < 2.3.32.3.3
jackc pgxv < 4.18.2, 5.0.0 ≤ v < 5.5.44.18.2, 5.5.4
github.com/jackc/pgproto3Gov < 2.3.32.3.3
github.com/jackc/pgproto3/v2Gov < 2.3.32.3.3
github.com/jackc/pgxGov < 4.18.2, 5.0.0 ≤ v < 5.5.4, No range specified4.18.2, 5.5.4
github.com/jackc/pgx/v4Gov < 4.18.24.18.2
github.com/jackc/pgx/v5Go5.0.0 ≤ v < 5.5.45.5.4

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.