NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-89.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nhibernate | nhibernate-core | before 5.4.9; 5.5.0 to before 5.5.2 | 5.4.9, 5.5.2 | Patch available | CNA |
| — | NHibernate (NuGet) | before 5.4.9 | 5.4.9 | Patch available | GHSA-fg4q-ccq8-3r5q |
| — | NHibernate (NuGet) | 5.5.0 to before 5.5.2 | 5.5.2 | Patch available | GHSA-fg4q-ccq8-3r5q |
- nhibernate-core Vendornhibernate Affected before 5.4.9; 5.5.0 to before 5.5.2 Fixed in 5.4.9, 5.5.2 Patch available CNA
- NHibernate (NuGet) Vendor— Affected before 5.4.9 Fixed in 5.4.9 Patch available GHSA-fg4q-ccq8-3r5q
- NHibernate (NuGet) Vendor— Affected 5.5.0 to before 5.5.2 Fixed in 5.5.2 Patch available GHSA-fg4q-ccq8-3r5q
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:nhibernate:nhibernate-core:*:*:*:*:*:*:*:* | before 5.4.9; 5.5.0 to before 5.5.2 | Vulnerable | nhibernate |
- cpe:2.3:a:nhibernate:nhibernate-core:*:*:*:*:*:*:*:* Versions before 5.4.9; 5.5.0 to before 5.5.2 Vulnerable ·nhibernate
Remediation
- Fix · CNA nhibernate-core (nhibernate) Fixed in 5.4.9, 5.5.2
- Fix · GHSA-fg4q-ccq8-3r5q NHibernate (NuGet) Fixed in 5.4.9 Advisory →
- Fix · GHSA-fg4q-ccq8-3r5q NHibernate (NuGet) Fixed in 5.5.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-39677
- 2026-10-03 Alias added: GHSA-fg4q-ccq8-3r5q
References
Patch 2
Advisory 2
Sources
- CVE-2024-39677 · CVE Program
- CVE-2024-39677 · NVD
- FIRST EPSS
- GHSA-fg4q-ccq8-3r5q · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences