CVE-2024-39677
published medium CVSS 3.1 · 5.9NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nhibernate | — | nhibernate-core< 5.4.9 · >= 5.5.0, < 5.5.2 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.9 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nhibernate | nhibernate-core | < 5.4.9 (affected)>= 5.5.0, < 5.5.2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
5- https://github.com/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9
- https://github.com/nhibernate/nhibernate-core/issues/3516
- https://github.com/nhibernate/nhibernate-core/pull/3517
- https://github.com/nhibernate/nhibernate-core/pull/3547
- https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q
Provider assertions
3GitHub_M · cna
NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 495097597aa823d89b870ecac98b00b19c8350ddbf08f04377175de7ee9a9701
- Ingested
- 23 Sep 2026, 08:25:18 UTC
- Source record
- Official CVE record