SQL Injection Affecting nhibernate package, versions [,5.4.9)[5.5.0,5.5.2)


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.07% (33rd 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-NHIBERNATE-7416902
  • published7 Jul 2024
  • disclosed3 Jul 2024
  • creditFrédéric Delaporte

Introduced: 3 Jul 2024

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

How to fix?

Upgrade NHibernate to version 5.4.9, 5.5.2 or higher.

Overview

NHibernate is a mature, open source object-relational mapper for the .NET framework. It is actively developed, fully featured and used in thousands of successful projects.

Affected versions of this package are vulnerable to SQL Injection when passing unescaped user input to ILiteralType.ObjectToSQLString, including discriminator values passed via mappings, HQL queries with references to static fields, and overloading the AddColumn function in SqlInsertBuilder or SqlUpdateBuilder.

Workaround

This vulnerability can be avoided for the discriminator case by eliminating quoted text from values used in discriminator mappings.

CVSS Scores

version 4.0
version 3.1