pgx SQL Injection via Protocol Message Size Overflow

Summary

CVECVE-2024-27304
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-03-06 19:15:08 UTC
Updated2026-05-21 19:58:35 UTC
Descriptionpgx 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.

Risk And Classification

Primary CVSS: v3.1 9.8 CRITICAL from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1CNADECLARED9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Jackc Pgproto3 All All All All
Application Jackc Pgx All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Jackc Pgx affected < 4.18.2 Not specified
CNA Jackc Pgx affected >= 5.0.0, < 5.5.4 Not specified
ADP Jackc Pgx affected 4.18.2 custom Not specified
ADP Jackc Pgx affected 5.0.0 5.5.4 custom Not specified

References

ReferenceSourceLinkTags
github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 af854a3a-2127-422b-91ae-364da2661108 github.com Patch
www.youtube.com/watch [email protected] www.youtube.com Press/Media Coverage
github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df af854a3a-2127-422b-91ae-364da2661108 github.com Patch
github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv af854a3a-2127-422b-91ae-364da2661108 github.com Vendor Advisory
github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 af854a3a-2127-422b-91ae-364da2661108 github.com Patch
github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 af854a3a-2127-422b-91ae-364da2661108 github.com Vendor Advisory
github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 af854a3a-2127-422b-91ae-364da2661108 github.com Patch
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 997622 GO (Go) Security Update for github.com/jackc/pgproto3 (GHSA-7jwh-3vrq-q3m8)
  • 997623 GO (Go) Security Update for github.com/jackc/pgproto3 (GHSA-mrww-27vc-gghv)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report