CVE-2026-0603
Second-Order SQL Injection in Hibernate Risks Data Exposure and DoS
Publication date: 2026-01-23
Last updated on: 2026-03-30
Assigner: Red Hat, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| hibernate | hibernate-core | From 1.0.0 (inc) to 5.5.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-89 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a second-order SQL injection flaw in the Hibernate ORM framework's InlineIdsOrClauseBuilder component. It occurs when user-supplied ID values containing special non-alphanumeric characters are not properly sanitized before being reused in SQL queries. An attacker with low privileges can exploit this by providing crafted IDs, leading to unauthorized actions such as reading sensitive system files or deleting data within the application's database. [1]
How can this vulnerability impact me? :
Exploiting this vulnerability can lead to sensitive information disclosure, such as reading parts of system files like /etc/passwd, unauthorized data manipulation or deletion within the application's database, and potentially cause an application-level denial of service. This can compromise the integrity, confidentiality, and availability of your application data. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection involves checking if your Hibernate application uses the InlineIdsOrClauseBuilder bulk ID strategy and accepts user-supplied IDs containing non-alphanumeric characters such as {, }, :, ", ', and =. You can look for unusual SQL queries or logs showing these characters in ID fields. Additionally, running the provided proof-of-concept scripts (hibernate-poc-attack1.py and hibernate-poc-attack2.py) in a controlled test environment can help confirm vulnerability. Specific commands are not provided, but monitoring application logs for suspicious ID inputs and testing with the PoC scripts are recommended. [1]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include disabling or not using the InlineIdsOrClauseBuilder bulk ID strategy in Hibernate, sanitizing and validating all user-supplied ID inputs to exclude non-alphanumeric characters, and applying any available patches or updates from Hibernate that address this vulnerability. Restricting user input and monitoring for suspicious activity are also advised until a fix is applied. [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability could lead to unauthorized disclosure and manipulation of sensitive data within the application's database, which may result in non-compliance with data protection regulations such as GDPR and HIPAA that require safeguarding personal and sensitive information. Exploitation could expose sensitive information and disrupt data integrity and availability, potentially violating these standards' requirements for confidentiality, integrity, and availability of protected data. [1]