CVE-2024-39677 json
NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities
published 2024-07-08 2 y ago modified 2026-09-10 1 mo ago also GHSA-fg4q-ccq8-3r5q , EUVD-2024-2335
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 47%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- nuget NHibernate 5.4.9, 5.5.2
- nhibernate nhibernate-core 5.4.9, 5.5.2
- github.com/nhibernate/nhibernate-core@b4a69d1 commit
- github.com/nhibernate/nhibernate-core#3517 pull request
- github.com/nhibernate/nhibernate-core#3547 pull request
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.58% chance of exploitation in the next 30 days, higher than 47% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| nuget | NHibernate | <5.4.9 >=5.5.0, <5.5.2 |
5.4.9 5.5.2 |
Affected products
- nhibernate nhibernate-core
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
-
github.com
/nhibernate/nhibernate-core/pull/3517
web, issue-tracking
-
github.com
/nhibernate/nhibernate-core/pull/3547
web, issue-tracking, patch
-
github.com
/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9
web, patch
-
github.com
/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q
web, vendor-advisory
-
github.com
/nhibernate/nhibernate-core/issues/3516
web, issue-tracking
-
nvd.nist.gov
/vuln/detail/CVE-2024-39677
advisory
-
github.com
/nhibernate/nhibernate-core
package
Sources
- CVE List CVE-2024-39677
- GitHub Advisory GHSA-fg4q-ccq8-3r5q
- NVD CVE-2024-39677
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.