SQL Injection Affecting nhibernate package, versions [,5.4.9) [5.5.0,5.5.2)
Threat Intelligence
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 ID SNYK-DOTNET-NHIBERNATE-7416902
- published 7 Jul 2024
- disclosed 3 Jul 2024
- credit Frédéric Delaporte
Introduced: 3 Jul 2024
CVE-2024-39677 Open this link in a new tabHow 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.