CVE-2024-32655

8.1 HIGH
Published: May 14, 2024 Modified: April 15, 2026
View on NVD

Description

Npgsql is the .NET data provider for PostgreSQL. The `WriteBind()` method in `src/Npgsql/Internal/NpgsqlConnector.FrontendMessages.cs` uses `int` variables to store the message length and the sum of parameter lengths. Both variables overflow when the sum of parameter lengths becomes too large. This causes Npgsql to write a message size that is too small when constructing a Postgres protocol message to send it over the network to the database. When parsing the message, the database will only read a small number of bytes and treat any following bytes as new messages while they belong to the old message. Attackers can abuse this to inject arbitrary Postgres protocol messages into the connection, leading to the execution of arbitrary SQL statements on the application's behalf. This vulnerability is fixed in 4.0.14, 4.1.13, 5.0.18, 6.0.11, 7.0.7, and 8.0.3.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://github.com/npgsql/npgsql/releases/tag/v4.0.14
Source: security-advisories@github.com
https://github.com/npgsql/npgsql/releases/tag/v4.1.13
Source: security-advisories@github.com
https://github.com/npgsql/npgsql/releases/tag/v5.0.18
Source: security-advisories@github.com
https://github.com/npgsql/npgsql/releases/tag/v6.0.11
Source: security-advisories@github.com
https://github.com/npgsql/npgsql/releases/tag/v7.0.7
Source: security-advisories@github.com
https://github.com/npgsql/npgsql/releases/tag/v8.0.3
Source: security-advisories@github.com
https://www.youtube.com/watch?v=Tfg1B8u1yvE
Source: security-advisories@github.com
https://github.com/npgsql/npgsql/releases/tag/v4.0.14
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/npgsql/npgsql/releases/tag/v4.1.13
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/npgsql/npgsql/releases/tag/v5.0.18
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/npgsql/npgsql/releases/tag/v6.0.11
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/npgsql/npgsql/releases/tag/v7.0.7
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/npgsql/npgsql/releases/tag/v8.0.3
Source: af854a3a-2127-422b-91ae-364da2661108

29 reference(s) from NVD

Quick Stats

CVSS v3 Score
8.1 / 10.0
EPSS (Exploit Probability)
1.6%
82th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)