{"id":"CVE-2024-39677","state":"PUBLISHED","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 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.","publishedAt":"2024-07-08T14:52:39.053Z","updatedAt":"2024-08-02T04:26:15.958Z","severity":{"score":5.9,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["nhibernate nhibernate-core"],"affected":[{"vendor":"nhibernate","product":"nhibernate-core","versions":[{"version":"< 5.4.9","status":"affected"},{"version":">= 5.5.0, < 5.5.2","status":"affected"}]}],"references":["https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q","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/commit/b4a69d1a5ff5744312478d70308329af496e4ba9"],"weaknesses":["CWE-89"],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/39xxx/CVE-2024-39677.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-39677","state":"PUBLISHED","datePublished":"2024-07-08T14:52:39.053Z","dateUpdated":"2024-08-02T04:26:15.958Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-06-27T18:44:13.033Z"},"containers":{"cna":{"title":"NHibernate SQL injection vulnerability in discriminator mappings, static fields referenced in HQL, and some utilities","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"nhibernate","product":"nhibernate-core","versions":[{"version":"< 5.4.9","status":"affected"},{"version":">= 5.5.0, < 5.5.2","status":"affected"}]}],"references":[{"url":"https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q","name":"https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nhibernate/nhibernate-core/issues/3516","name":"https://github.com/nhibernate/nhibernate-core/issues/3516","tags":["x_refsource_MISC"]},{"url":"https://github.com/nhibernate/nhibernate-core/pull/3517","name":"https://github.com/nhibernate/nhibernate-core/pull/3517","tags":["x_refsource_MISC"]},{"url":"https://github.com/nhibernate/nhibernate-core/pull/3547","name":"https://github.com/nhibernate/nhibernate-core/pull/3547","tags":["x_refsource_MISC"]},{"url":"https://github.com/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9","name":"https://github.com/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.9,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-89","lang":"en","description":"CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-07-08T14:52:39.053Z"},"source":{"advisory":"GHSA-fg4q-ccq8-3r5q","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-08T17:40:31.738373Z","id":"CVE-2024-39677","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-08T19:58:45.785Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q","name":"https://github.com/nhibernate/nhibernate-core/security/advisories/GHSA-fg4q-ccq8-3r5q","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/nhibernate/nhibernate-core/issues/3516","name":"https://github.com/nhibernate/nhibernate-core/issues/3516","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/nhibernate/nhibernate-core/pull/3517","name":"https://github.com/nhibernate/nhibernate-core/pull/3517","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/nhibernate/nhibernate-core/pull/3547","name":"https://github.com/nhibernate/nhibernate-core/pull/3547","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9","name":"https://github.com/nhibernate/nhibernate-core/commit/b4a69d1a5ff5744312478d70308329af496e4ba9","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:26:15.958Z"}}]}}}