GHSA-j8jw-g6fq-mp7h is a high-severity (CVSS 7.4) SQL Injection vulnerability in org.hibernate:hibernate-core. A fix is available for org.hibernate:hibernate-core — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-j8jw-g6fq-mp7h.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-j8jw-g6fq-mp7h by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,987 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.hibernate:hibernate-core☕org.hibernate:hibernate-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
A flaw was found in hibernate-core in versions prior to 5.3.20.Final and in 5.4.0.Final up to and including 5.4.23.Final. A SQL injection in the implementation of the JPA Criteria API can permit unsanitized literals when a literal is used in the SQL comments of the query. This flaw could allow an attacker to access unauthorized information or possibly conduct further attacks. The highest threat from this vulnerability is to data confidentiality and integrity.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.hibernate:hibernate-core | ≥ 5.4.0.Final&&< 5.4.24.Final | 5.4.24.Finalorg.hibernate:hibernate-core:5.4.24.Final |
| ☕Maven | org.hibernate:hibernate-core | all versions | 5.3.20.Finalorg.hibernate:hibernate-core:5.3.20.Final |
Affected Products
debian linuxdebianhibernate ormhibernatecommunications cloud native core consoleoracleretail customer management and segmentation foundationoraclequarkusquarkusDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.hibernate:hibernate-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.hibernate:hibernate-core to 5.4.24.Final or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-j8jw-g6fq-mp7h is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
For Red Hat Process Automation Manager and Red Hat Decision Manager, the kie-server-ee7 zip is primarily for Weblogic/Websphere which is decided to stay on hibernate 5.1.x, it's not possible to make an upgrade to 5.3.x due to technical reasons. For this reason this fix is included only for kie-server-ee7. For this…
Set hibernate.use_sql_comments to false, which is the default value, or use named parameters instead of literals. Please refer to details in https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#configurations-logging and https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#sql-query-parameters.Source: Red Hat security advisory for GHSA-j8jw-g6fq-mp7h (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| EAP 7.3.3 | hibernate-core | RHSA-2020:5174 |
| Red Hat build of Quarkus 1.7.5 SP1 | hibernate-core | RHSA-2020:5302 |
| Red Hat Fuse 7.9 | hibernate-core | RHSA-2021:3140 |
| Red Hat Integration | hibernate-core | RHSA-2021:2039 |
| Red Hat JBoss Enterprise Application Platform 7 | hibernate-core | RHSA-2020:5344 |
| Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7 | eap7-glassfish-el-0:3.0.1-4.b08_redhat_00005.1.ep7.el7 | RHSA-2025:9582 |
| Red Hat JBoss Enterprise Application Platform 7.3 for RHEL 6 | eap7-hibernate-0:5.3.18-2.Final_redhat_00002.1.el6eap | RHSA-2020:5175 |
| Red Hat JBoss Enterprise Application Platform 7.3 for RHEL 6 | eap7-activemq-artemis-0:2.9.0-6.redhat_00016.1.el6eap | RHSA-2020:5340 |
Frequently Asked Questions
Is GHSA-j8jw-g6fq-mp7h in your dependencies?
Find it across Maven, including transitive dependencies.