Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
HIGH severity

CVE-2020-25638 — hibernate-core

HIGHFix: hibernate/hibernate-orm@36ebf7d

CVE-2020-25638 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.

SQL injection in hibernate-core

Also known asGHSA-j8jw-g6fq-mp7h
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 12, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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 CVE-2020-25638.

EPSS Exploitation Probability

via FIRST.org ↗
2.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs87th percentile — riskier than 87% of all scored CVEsHighest risk
0.00%1.20%2.40%3.60%0.8%2.9%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2020-25638 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
☕org.hibernate:hibernate-core☕org.hibernate:hibernate-core

Real-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

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenorg.hibernate:hibernate-core≥ 5.4.0.Final&&< 5.4.24.Final5.4.24.Finalorg.hibernate:hibernate-core:5.4.24.Final
☕Mavenorg.hibernate:hibernate-coreall versions5.3.20.Finalorg.hibernate:hibernate-core:5.3.20.Final

Affected Products

5 products · 7 configurations
OS
debian linuxdebian
2 versions
9.010.0
Application
hibernate ormhibernate
≥ 5.4.0 && < 5.4.24
range
Application
communications cloud native core consoleoracle
1 version
1.9.0
Application
retail customer management and segmentation foundationoracle
1 version
19.0
Application
quarkusquarkus
≤ 1.9.2
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. 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 CVE-2020-25638 is resolved across your whole dependency graph.

  3. 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.

Red HatImportant

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…

Workaround published by Red Hat
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 CVE-2020-25638 (CC BY 4.0)
ProductFixed inAdvisory
EAP 7.3.3hibernate-coreRHSA-2020:5174
Red Hat build of Quarkus 1.7.5 SP1hibernate-coreRHSA-2020:5302
Red Hat Fuse 7.9hibernate-coreRHSA-2021:3140
Red Hat Integrationhibernate-coreRHSA-2021:2039
Red Hat JBoss Enterprise Application Platform 7hibernate-coreRHSA-2020:5344
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-glassfish-el-0:3.0.1-4.b08_redhat_00005.1.ep7.el7RHSA-2025:9582
Red Hat JBoss Enterprise Application Platform 7.3 for RHEL 6eap7-hibernate-0:5.3.18-2.Final_redhat_00002.1.el6eapRHSA-2020:5175
Red Hat JBoss Enterprise Application Platform 7.3 for RHEL 6eap7-activemq-artemis-0:2.9.0-6.redhat_00016.1.el6eapRHSA-2020:5340

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2020-25638 in your dependencies?

Find it across Maven, including transitive dependencies.

CVE-2020-25638: hibernate-core — Fixed in 5.4.24.Final