CVE-2026-0603: Hibernate core SQL Injection Vulnerability

HIGH
Advisory Identifier: GHSA-2p5w-cvg5-gc5c
CVSS 8.3
CWE-89
Published
Advisory Summary

CVE-2026-0603 is a HIGH (CVSS 8.3) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Hibernate core libraries in the Maven ecosystem. The issue involves hibernate vulnerable to sql injection. Remediation is available by upgrading affected packages to version 5.3.38.

CVE-2026-0603 at a Glance

CVE Identifier CVE-2026-0603
GHSA Identifier GHSA-2p5w-cvg5-gc5c
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Hibernate core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-0603

To remediate this vulnerability, upgrade all affected Hibernate core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.hibernate:hibernate-core fixed: 5.3.38
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>5.3.38</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.hibernate

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-0603, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.hibernate

Analyze the terminal output to locate any version of Hibernate core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.3.38), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.hibernate command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Hibernate core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A flaw was found in Hibernate. A remote attacker with low privileges could exploit a second-order SQL injection vulnerability by providing specially crafted, unsanitized non-alphanumeric characters in the ID column when the InlineIdsOrClauseBuilder is used. This could lead to sensitive information disclosure, such as reading system files, and allow for data manipulation or deletion within the application's database, resulting in an application level denial of service.

CVE-2026-0603 Affected Hibernate core Versions

1 component(s)
Fixed Versions:
5.3.38
Product / Package Ecosystem Affected Versions Fixed Version
org.hibernate:hibernate-core
Maven
≥ 5.2.8
< 5.3.38
5.3.38

References

NVD — CVE-2026-0603 NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-0603
Security Fix Commit FIX COMMIT
https://github.com/hibernate/hibernate-orm/commit/3f820fdf16ee4d1f556bc73b259625416d703048
Hibernate core Security Information SECURITY
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-0603.json
Hibernate core Source Repository REPOSITORY
https://github.com/hibernate/hibernate-orm
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2427147
Hibernate core Security Information SECURITY
https://access.redhat.com/security/cve/CVE-2026-0603
access.redhat.com/errata/rhsa-2026:76... WEB
https://access.redhat.com/errata/RHSA-2026:76134
access.redhat.com/errata/rhsa-2026:76... WEB
https://access.redhat.com/errata/RHSA-2026:76132
access.redhat.com/errata/rhsa-2026:76... WEB
https://access.redhat.com/errata/RHSA-2026:76130
access.redhat.com/errata/rhsa-2026:76... WEB
https://access.redhat.com/errata/RHSA-2026:76129
access.redhat.com/errata/rhsa-2026:76... WEB
https://access.redhat.com/errata/RHSA-2026:76128
access.redhat.com/errata/rhsa-2026:60... WEB
https://access.redhat.com/errata/RHSA-2026:6012
access.redhat.com/errata/rhsa-2026:60... WEB
https://access.redhat.com/errata/RHSA-2026:6011
access.redhat.com/errata/rhsa-2026:49... WEB
https://access.redhat.com/errata/RHSA-2026:4924
access.redhat.com/errata/rhsa-2026:49... WEB
https://access.redhat.com/errata/RHSA-2026:4917
access.redhat.com/errata/rhsa-2026:49... WEB
https://access.redhat.com/errata/RHSA-2026:4916
access.redhat.com/errata/rhsa-2026:49... WEB
https://access.redhat.com/errata/RHSA-2026:4915

Frequently Asked Questions

What is CVE-2026-0603?
CVE-2026-0603 is a security vulnerability in Hibernate core involving Hibernate vulnerable to SQL Injection under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Hibernate core versions are affected?
Affected versions include releases prior to 5.3.38 across affected packages: org.hibernate:hibernate-core.
What version fixes CVE-2026-0603?
Upgrading to 5.3.38 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hibernate-core affected?
Yes, org.hibernate:hibernate-core is affected in releases prior to 5.3.38. Upgrade your dependency to 5.3.38 or later.
What is the CVSS score of CVE-2026-0603?
CVE-2026-0603 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2026-0603?
CVE-2026-0603 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Maven dependencies for CVE-2026-0603?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.hibernate'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2p5w-cvg5-gc5c",
  "modified" : "2026-10-06T18:31:15Z",
  "published" : "2026-01-23T09:30:28Z",
  "aliases" : [ "CVE-2026-0603" ],
  "summary" : "Hibernate vulnerable to SQL Injection",
  "details" : "A flaw was found in Hibernate. A remote attacker with low privileges could exploit a second-order SQL injection vulnerability by providing specially crafted, unsanitized non-alphanumeric characters in the ID column when the InlineIdsOrClauseBuilder is used. This could lead to sensitive information disclosure, such as reading system files, and allow for data manipulation or deletion within the application's database, resulting in an application level denial of service.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.hibernate:hibernate-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.8"
      }, {
        "fixed" : "5.3.38"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-0603"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/hibernate/hibernate-orm/commit/3f820fdf16ee4d1f556bc73b259625416d703048"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-0603.json"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hibernate/hibernate-orm"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2427147"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-0603"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:76134"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:76132"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:76130"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:76129"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:76128"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:6012"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:6011"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:4924"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:4917"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:4916"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:4915"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-16T22:44:41Z",
    "nvd_published_at" : "2026-01-23T07:15:53Z"
  }
}