GitHub Advisoryadvisory · Go

GHSA-7jwh-3vrq-q3m8 pgproto3 SQL Injection via Protocol Message Size Overflow

HIGH Published 2024-03-04 Modified 2024-09-13 Official page ↗
Ecosystem
Go
Packages
github.com/jackc/pgproto3, github.com/jackc/pgproto3/v2
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-190, CWE-89
Reviewed
2024-03-04

Affected packages

• Go github.com/jackc/pgproto3: < 2.3.3 → fixed in 2.3.3 • Go github.com/jackc/pgproto3/v2: < 2.3.3 → fixed in 2.3.3

Description

Impact 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. Patches The problem is resolved in v2.3.3 Workarounds Reject user input large enough to cause a single query or bind message to exceed 4 GB in size.

Related

Weakness · CWE (2)

  • CWE-190 Integer Overflow or Wraparound weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References