NHibernate
Affected
- introduced
0, fixed5.4.9(ecosystem)
Fixed versions
5.4.9
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2024-39677
NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities
Impact
A SQL injection vulnerability exists in some types implementing ILiteralType.ObjectToSQLString. Callers of these methods are exposed to the vulnerability, which includes:
SqlInsertBuilder and SqlUpdateBuilder utilities, calling their AddColumn overload taking a literal value. These overloads are unused by NHibernate but could be used by users referencing directly these utilities.ObjectToSQLString methods for building SQL queries on the user side.Patches
Releases 5.4.9 and 5.5.2.
Workarounds
ToString conversion can be altered to include SQL injections through adequate hacking of the current culture settings, either change for another type, or ensure the used values cannot allow culture exploits, or ensure the application performs sanity checks of the current culture settings. Types sensitive to culture include integers for negative values, dates, times and datetimes, floats and decimals.References
High Basis: The source's own band: HIGH
0, fixed 5.4.9 (ecosystem)5.4.9
The export has no generic command for this ecosystem.
5.5.0, fixed 5.5.2 (ecosystem)5.5.2
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0