Vulnerability · Published Jul 8, 2024 · Assigned by GitHub_M

CVE-2024-39677NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities

Medium 5.9

In plain English

A medium-severity SQL injection in nhibernate-core from nhibernate. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)0.6%top 52.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

NHibernate is an object-relational mapper for the .NET framework. A SQL injection vulnerability exists in some types implementing ILiteralType.ObjectToSQLString. Callers of these methods are exposed to the vulnerability, which includes mappings using inheritance with discriminator values; HQL queries referencing a static field of the application; users of the SqlInsertBuilder and SqlUpdateBuilder utilities, calling their AddColumn overload taking a literal value; and any direct use of the ObjectToSQLString methods for building SQL queries on the user side. This vulnerability is fixed in 5.4.9 and 5.5.2.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
NuGetnhibernate5.4.9GHSA-fg4q-ccq8-3r5q
NuGetnhibernate5.5.2GHSA-fg4q-ccq8-3r5q

Affected products (as reported)

VendorProductVersions
nhibernate nhibernate-core < 5.4.9>= 5.5.0, < 5.5.2

Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

References