{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-39677","id":"CVE-2024-39677","title":"NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities","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 ","descriptionLong":"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.","published":"2024-07-08T14:52:39.053Z","updated":"2026-10-28T02:30:59.275145927Z","reserved":"2024-06-27T18:44:13.033Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["nhibernate-core"],"affectedProducts":[{"vendor":"nhibernate","product":"nhibernate-core","defaultStatus":null,"versions":[{"version":"< 5.4.9","status":"affected"},{"version":">= 5.5.0, < 5.5.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"NuGet","name":"NHibernate","purl":"pkg:nuget/NHibernate","ranges":["<5.4.9",">=5.5.0 <5.5.2"],"fixed":["5.4.9","5.5.2"],"advisory":"GHSA-fg4q-ccq8-3r5q"}],"cwes":["CWE-89"],"aliases":["GHSA-fg4q-ccq8-3r5q"],"references":[{"url":"https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/nhibernate/nhibernate-core/issues/3516","tags":["x_refsource_MISC","x_transferred","Issue Tracking","report","web"]},{"url":"https://github.com/nhibernate/nhibernate-core/pull/3517","tags":["x_refsource_MISC","x_transferred","Issue Tracking","fix","web"]},{"url":"https://github.com/nhibernate/nhibernate-core/pull/3547","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39677.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39677","tags":["advisory"]},{"url":"https://github.com/nhibernate/nhibernate-core","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00578,"epssPercentile":0.48333,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-39677","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39677","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-39677","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-fg4q-ccq8-3r5q","ok":true,"note":"GHSA-fg4q-ccq8-3r5q"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-39677","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}