REDHAT-BUG-2427147: SQL Injection

Published Jan 5, 2026
·
Updated

I found a second order SQL Injection that I think is interesting enough to report. On line 27 of Hibernate's InlineIdsOrClauseBuilder, the value we put into the Id column will be reused unsanitized. We do have to activate it as described here: https://in.relation.to/2017/02/01/non-temporary-table-bulk-id-strategies/#inlineidsorclausebulkidstrategy. If the user is able to set their own ids and those ids allow non-alphanumeric characters (My POC needs these: {, }, :, \", \', =) and they are using InlineIdsOrClauseBuilder then the Application is vulnerable to attack. I have provided hibernate-poc-2.zip with a vulnerable hibernate application along with 2 python scripts as POCs. In my POCs I am able to delete all items in the table with a simple id (see hibernate-poc-attack1.py in the zip), and with a slightly more complicated Id I am able to read the first 100 characters of from the

/etc/passwd

file (see hibernate-poc-attack2.py in the zip).

Affected Software

1 affected component
Hibernate Hibernate

Event History

Jan 5, 2026
Data Sourced
via Red Hat·01:16 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2427147?

REDHAT-BUG-2427147 is classified as a critical vulnerability due to its potential for second order SQL Injection.

2

How do I fix REDHAT-BUG-2427147?

To fix REDHAT-BUG-2427147, ensure that the Id column values are properly sanitized before being reused.

3

Which versions of Hibernate are affected by REDHAT-BUG-2427147?

All versions of Hibernate that employ the InlineIdsOrClauseBuilder may be affected by REDHAT-BUG-2427147.

4

What is a second order SQL Injection in the context of REDHAT-BUG-2427147?

In the context of REDHAT-BUG-2427147, a second order SQL Injection occurs when unsanitized input is reused in a subsequent database query, allowing attackers to manipulate database operations.

5

What precautions should be taken regarding REDHAT-BUG-2427147?

Developers should review their use of InlineIdsOrClauseBuilder and implement input validation to prevent vulnerabilities related to REDHAT-BUG-2427147.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203