CVE-2024-27304

pgx SQL Injection via Protocol Message Size Overflow

State
Published
Severity
9.8 Critical
Published
Mar 6, 2024
Updated
Dec 12, 2024
Reserved
Feb 22, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HGitHub_M

Weaknesses

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • CWE-190 Integer Overflow or Wraparound

Affected Products

ProductVersions
pgxjackc
  • < 4.18.2Affected
  • >= 5.0.0, < 5.5.4Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.