CVE-2024-27304
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.
How to fix
- jackc pgproto32.3.3 or later
- jackc pgx4.18.2, 5.5.4 or later
- github.com/jackc/pgproto32.3.3 or later
- github.com/jackc/pgproto3/v22.3.3 or later
- github.com/jackc/pgx4.18.2, 5.5.4 or later
- github.com/jackc/pgx/v44.18.2 or later
- github.com/jackc/pgx/v55.5.4 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| jackc pgproto3 | v < 2.3.3 | 2.3.3 |
| jackc pgx | v < 4.18.2, 5.0.0 ≤ v < 5.5.4 | 4.18.2, 5.5.4 |
| github.com/jackc/pgproto3Go | v < 2.3.3 | 2.3.3 |
| github.com/jackc/pgproto3/v2Go | v < 2.3.3 | 2.3.3 |
| github.com/jackc/pgxGo | v < 4.18.2, 5.0.0 ≤ v < 5.5.4, No range specified | 4.18.2, 5.5.4 |
| github.com/jackc/pgx/v4Go | v < 4.18.2 | 4.18.2 |
| github.com/jackc/pgx/v5Go | 5.0.0 ≤ v < 5.5.4 | 5.5.4 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.