Skip to main content

Integer Overflow or Wraparound

CVE-2024-27304

Severity High
Score 9.8/10

Summary

pgx is a PostgreSQL driver and toolkit for Go. An 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 one large message to be sent as multiple messages under the attacker's control. This issue affects github.com/jackc/pgproto3 package versions through v2.3.2, github.com/jackc/pgx/v4 versions v4.0.0-pre1 through v4.18.1, github.com/jackc/pgx/v5 package versions 5.0.0-alpha.1 through v5.5.3. As a workaround, reject user input large enough to cause a single query or bind message to exceed 4 GB in size.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • HIGH

CWE-190 - Integer Overflow or Wraparound

The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

Advisory Timeline

  • Published