Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Npgsql Vulnerable to SQL Injection via Protocol Message Size Overflow

CVSS 3.1 8.1 HIGHEUVD CVSS 3.1 8.1 CVSS 3.1 · [email protected] · Secondary 8.1 HIGHCVSS_V3 Publisher rating HIGHFixed by Npgsql 8.0.3Fixed by Npgsql 4.0.14Fixed by Npgsql 4.1.13Fixed by Npgsql 5.0.18KEV status unknown

cve-program · CVE-2024-32655

Published

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.

Read the publisher's advisory

euvd · EUVD-2024-1856

Published

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.

Read the publisher's advisory

nvd · CVE-2024-32655

Published

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.

Read the publisher's advisory

osv · GHSA-x9vc-6hfv-hg8c

Published

### Summary 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. ### Impact Attackers can issue arbitrary SQL statements to the database on behalf of the application. The final impact depends on the application that uses Npgsql, the data it stores in Postgres, etc.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2024-32655

Published

npgsql

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "npgsql",
                    "product": "npgsql",
                    "versions": [
                        {
                            "version": ">= 4.0.0, < 4.0.14",
                            "status": "affected"
                        },
                        {
                            "version": ">= 4.1.0, < 4.1.13",
                            "status": "affected"
                        },
                        {
                            "version": ">= 5.0.0, < 5.0.18",
                            "status": "affected"
                        },
                        {
                            "version": ">= 6.0.0, < 6.0.11",
                            "status": "affected"
                        },
                        {
                            "version": ">= 7.0.0, < 7.0.7",
                            "status": "affected"
                        },
                        {
                            "version": ">= 8.0.0, < 8.0.3",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2024-1856

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: May 9, 2024, 2:29:14 PM

dateUpdated: Dec 12, 2024, 8:56:10 PM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2024-32655

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Deferred

Weakness classifications: CWE-89 · CWE-190

Original publisher date fields

published: 2024-05-14T15:36:51.087

lastModified: 2026-06-17T07:30:09.943

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-x9vc-6hfv-hg8c

Published

Npgsql

NuGet

ECOSYSTEM · introduced 8.0.0 → fixed 8.0.3

3 versions listed as affected

8.0.0, 8.0.1, 8.0.2

Npgsql

NuGet

ECOSYSTEM · introduced 0 → fixed 4.0.14

84 versions listed as affected

2.0.11, 2.0.12, 2.0.12.1, 2.0.13-beta1, 2.0.14.1, 2.0.14.2, 2.0.14.3, 2.1.0, 2.1.0-beta1, 2.1.0-rc1, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.0-beta1, 2.2.0-rc1, 2.2.0-rc2, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.4.1, 2.2.4.2, 2.2.4.3, 2.2.5, 2.2.6, 2.2.7, 3.0.0, 3.0.0-beta0001, 3.0.0-rc0001, 3.0.0-rc0002, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.1.0, 3.1.0-alpha1, 3.1.0-alpha2, 3.1.0-alpha3, 3.1.0-alpha4, 3.1.0-alpha5, 3.1.0-alpha6, 3.1.0-beta0001, 3.1.1, 3.1.10, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.2.0, 3.2.0-beta1, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.4.1, 3.2.5, 3.2.6, 3.2.7, 4.0.0, 4.0.0-preview1, 4.0.0-preview2, 4.0.0-rc1, 4.0.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9

Npgsql

NuGet

ECOSYSTEM · introduced 4.1.0 → fixed 4.1.13

14 versions listed as affected

4.1.0, 4.1.1, 4.1.10, 4.1.11, 4.1.12, 4.1.2, 4.1.3, 4.1.3.1, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.1.9

Npgsql

NuGet

ECOSYSTEM · introduced 5.0.0 → fixed 5.0.18

16 versions listed as affected

5.0.0, 5.0.1, 5.0.1.1, 5.0.10, 5.0.11, 5.0.12, 5.0.13, 5.0.14, 5.0.15, 5.0.16, 5.0.17, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.7

Npgsql

NuGet

ECOSYSTEM · introduced 6.0.0 → fixed 6.0.11

11 versions listed as affected

6.0.0, 6.0.1, 6.0.10, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9

Npgsql

NuGet

ECOSYSTEM · introduced 7.0.0 → fixed 7.0.7

5 versions listed as affected

7.0.0, 7.0.1, 7.0.2, 7.0.4, 7.0.6

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 16 Nov 22:31 UTC · 274 of 275 readable · 250 fully read · 20 waiting for GitHub's hourly limit · documentation 469/469 current