cve.bz

CVE-2024-32655 npgsql npgsql: SQL Injection

8.1 highEPSS 1.7%Fix available

High (8.1) in npgsql npgsql. EPSS 1.7% estimated probability of exploitation activity in the next 30 days. Fixed in Npgsql 4.0.14, 4.1.13, 5.0.18.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.7% (unchanged from 1.7% a week ago; 1.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 78th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2024-05-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
CWE-190 Integer Overflow or Wraparound (Year 2038 problem, Y2K38, Y2038, Epochalypse)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • Npgsql (NuGet): fixed in 8.0.3, 4.0.14, 4.1.13, 5.0.18, 6.0.11, 7.0.7

Ask an AI about this CVE

Show the promptExplain CVE-2024-32655 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-32655?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-32655?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-32655 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
npgsql>= 4.0.0, < 4.0.14
npgsql>= 4.1.0, < 4.1.13
npgsql>= 5.0.0, < 5.0.18
npgsql>= 6.0.0, < 6.0.11
npgsql>= 7.0.0, < 7.0.7
npgsql>= 8.0.0, < 8.0.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-x9vc-6hfv-hg8cNuGetNpgsql>=8.0.0 <8.0.38.0.3
GHSA-x9vc-6hfv-hg8cNuGetNpgsql<4.0.144.0.14
GHSA-x9vc-6hfv-hg8cNuGetNpgsql>=4.1.0 <4.1.134.1.13
GHSA-x9vc-6hfv-hg8cNuGetNpgsql>=5.0.0 <5.0.185.0.18
GHSA-x9vc-6hfv-hg8cNuGetNpgsql>=6.0.0 <6.0.116.0.11
GHSA-x9vc-6hfv-hg8cNuGetNpgsql>=7.0.0 <7.0.77.0.7

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 2 morenpgsqlno fix listedUBUNTU-CVE-2024-32655

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High
  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON