ubuntu-cve-2024-32655
Vulnerability from osv_ubuntu
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.
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libnpgsql2.2-cil",
"binary_version": "2.2.7+dfsg3-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:16.04:LTS",
"name": "npgsql",
"purl": "pkg:deb/ubuntu/npgsql@2.2.7+dfsg3-1?arch=source\u0026distro=xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.7+dfsg3-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libnpgsql2.2-cil",
"binary_version": "2.2.7+dfsg3-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "npgsql",
"purl": "pkg:deb/ubuntu/npgsql@2.2.7+dfsg3-1?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.7+dfsg3-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libnpgsql2.2-cil",
"binary_version": "2.2.7+dfsg3-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "npgsql",
"purl": "pkg:deb/ubuntu/npgsql@2.2.7+dfsg3-1?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.7+dfsg3-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libnpgsql2.2-cil",
"binary_version": "2.2.7+dfsg3-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "npgsql",
"purl": "pkg:deb/ubuntu/npgsql@2.2.7+dfsg3-1?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.7+dfsg3-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libnpgsql2.2-cil",
"binary_version": "2.2.7+dfsg3-1.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "npgsql",
"purl": "pkg:deb/ubuntu/npgsql@2.2.7+dfsg3-1.1?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.2.7+dfsg3-1.1"
]
}
],
"aliases": [],
"details": "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\u0027s 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.",
"id": "UBUNTU-CVE-2024-32655",
"modified": "2026-04-22T07:48:47Z",
"published": "2024-05-14T15:36:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2024-32655"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2024-32655"
},
{
"type": "REPORT",
"url": "https://github.com/npgsql/npgsql/security/advisories/GHSA-x9vc-6hfv-hg8c"
},
{
"type": "REPORT",
"url": "https://github.com/npgsql/npgsql/commit/f7e7ead0702d776a8f551f5786c4cac2d65c4bc6"
}
],
"related": [],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2024-32655"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.