SQL Injection Affecting npgsql package, versions [,4.0.14)[4.1.0,4.1.13)[5.0.0,5.0.18)[6.0.0-preview2,6.0.11)[7.0.0-preview.1,7.0.7)[8.0.0-preview.1,8.0.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-DOTNET-NPGSQL-6825563
  • published9 May 2024
  • disclosed9 May 2024
  • creditPaul Gerste

Introduced: 9 May 2024

CVE-2024-32655  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade Npgsql to version 4.0.14, 4.1.13, 5.0.18, 6.0.11, 7.0.7, 8.0.3 or higher.

Overview

Npgsql is a .NET data provider for PostgreSQL.

Affected versions of this package are vulnerable to SQL Injection by overflowing the sum of the integer and parameter lengths in NpgsqlConnector.FrontendMessages.cs, allowing arbitrary SQL to be injected into a PostgreSQL protocol message if enough of the relevant parameters can be controlled by the attacker.

PoC

"\x51\x00\x00\x00\x11" + "DROP TABLE users;" + "A" * 0xffffffee

CVSS Scores

version 3.1