CVE-2020-25638
SQL injection in hibernate-core
Also known as GHSA-j8jw-g6fq-mp7h
Mitigation
- Upgrade org.hibernate:hibernate-core to one of 5.4.24.Final, 5.3.20.Final (or later in the same release line).
Who should check
- Projects that depend on Maven package org.hibernate:hibernate-core (>= 5.4.0.Final, < 5.4.24.Final)
- Anyone running hibernate-core Hibernate ORM versions before 5.4.24.Final
Vulnerability facts
- Affected
- org.hibernate:hibernate-core >= 5.4.0.Final, < 5.4.24.Final
- Fixed in
- 5.4.24.Final, 5.3.20.Final
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 2.69% chance of exploitation in 30 days (percentile 87, 2026-11-26)
- CWE
- CWE-89
- Modified
Description
A flaw was found in hibernate-core in versions prior 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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.hibernate:hibernate-core | >= 5.4.0.Final, < 5.4.24.Final | 5.4.24.Final, 5.3.20.Final | osv |
| hibernate-core | Hibernate ORM versions before 5.4.24.Final | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-25638. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-25638.md Affected: org.hibernate:hibernate-core >= 5.4.0.Final, < 5.4.24.Final Fixed in: 5.4.24.Final, 5.3.20.Final Steps: 1. Search this machine and project for org.hibernate:hibernate-core (Maven), hibernate-core: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://github.com/hibernate/hibernate-orm/commit/36ebf7d3836e83e99f2a91777b5389e1daf1f2b7
- https://github.com/hibernate/hibernate-orm/commit/59fede7acaaa1579b561407aefa582311f7ebe78
- https://github.com/hibernate/hibernate-orm/commit/d22bbb5c339c9df7712c3365bb1df97c91b35ec5
Other
- https://bugzilla.redhat.com/show_bug.cgi?id=1881353
- https://lists.debian.org/debian-lts-announce/2021/01/msg00000.html
- https://lists.apache.org/thread.html/r833c1276e41334fa675848a08daf0c61f39009f9f9a400d9f7006d44%40%3Cdev.turbine.apache.org%3E
- https://lists.apache.org/thread.html/rf2378209c676a28b71f9b604a3b3517c448540b85367160e558ef9df%40%3Ccommits.turbine.apache.org%3E
- https://github.com/hibernate/hibernate-orm
- https://lists.apache.org/thread.html/r833c1276e41334fa675848a08daf0c61f39009f9f9a400d9f7006d44@%3Cdev.turbine.apache.org%3E
- https://lists.apache.org/thread.html/rf2378209c676a28b71f9b604a3b3517c448540b85367160e558ef9df@%3Ccommits.turbine.apache.org%3E
FAQ
Is CVE-2020-25638 being exploited?
There is no confirmed exploitation: CVE-2020-25638 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.69% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-25638?
High: CVSS 7.4 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2020-25638?
org.hibernate:hibernate-core >= 5.4.0.Final, < 5.4.24.Final.
Is there a fix for CVE-2020-25638?
Yes. Fixed in 5.4.24.Final, 5.3.20.Final. Upgrade org.hibernate:hibernate-core to one of 5.4.24.Final, 5.3.20.Final (or later in the same release line).
How do I check if I'm affected by CVE-2020-25638?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.