GHSA-mrww-27vc-gghv

Source
https://github.com/advisories/GHSA-mrww-27vc-gghv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/03/GHSA-mrww-27vc-gghv/GHSA-mrww-27vc-gghv.json
Aliases
Published
2024-03-04T20:43:24Z
Modified
2024-03-14T21:45:18Z
Summary
pgx SQL Injection via Protocol Message Size Overflow
Details

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 v4.18.2 and v5.5.4.

Workarounds

Reject user input large enough to cause a single query or bind message to exceed 4 GB in size.

References

Affected packages

Go / github.com/jackc/pgx

Package

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
4.18.2

Go / github.com/jackc/pgx

Package

Affected ranges

Type
SEMVER
Events
Introduced
5.0.0
Fixed
5.5.4

Go / github.com/jackc/pgproto3

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
2.3.3

Go / github.com/jackc/pgproto3/v2

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
2.3.3

Go / github.com/jackc/pgx/v4

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
4.18.2

Go / github.com/jackc/pgx/v5

Affected ranges

Type
SEMVER
Events
Introduced
5.0.0
Fixed
5.5.4