cve.bz

CVE-2020-25638 SQL Injection

7.4 highEPSS 2.9%Fix available

High (7.4). EPSS 2.9% estimated probability of exploitation activity in the next 30 days. Fixed in org.hibernate:hibernate-core 5.3.20.Final, 5.4.24.Final.

On this page
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.

Severity

CVSS 3.1

7.4 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
2.9% (unchanged from 2.9% a week ago; 2.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 87th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2020-25638 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2020-25638?via=ask-ai-copy and https://cve.bz/cve/CVE-2020-25638?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2020-25638 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
hibernate:hibernate_ormbefore 5.3.20
hibernate:hibernate_ormfrom 5.4.0 before 5.4.24
debian:debian_linux9.0
debian:debian_linux10.0
quarkus:quarkusthrough 1.9.2
oracle:communications_cloud_native_core_console1.9.0
oracle:retail_customer_management_and_segmentation_foundation19.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-j8jw-g6fq-mp7hMavenorg.hibernate:hibernate-core>=5.4.0.Final <5.4.24.Final5.4.24.Final
GHSA-j8jw-g6fq-mp7hMavenorg.hibernate:hibernate-core<5.3.20.Final5.3.20.Final

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9libhibernate3-java3.6.10.Final-6+deb9u1DLA-2512-1
Debian10libhibernate3-java3.6.10.Final-9+deb10u1DSA-4908-1
Debian12, 13, 14libhibernate3-java3.6.10.Final-11DEBIAN-CVE-2020-25638
Ubuntu20.04:LTSlibhibernate3-java3.6.10.Final-9+deb10u1build0.20.04.1UBUNTU-CVE-2020-25638 USN-6845-1
UbuntuPro:16.04:LTSlibhibernate3-java3.6.10.Final-4ubuntu0.1~esm1UBUNTU-CVE-2020-25638 USN-6845-1
UbuntuPro:18.04:LTSlibhibernate3-java3.6.10.Final-9ubuntu0.18.04.1~esm1UBUNTU-CVE-2020-25638 USN-6845-1
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-activemq-artemis, eap7-activemq-artemis-ra, eap7-activemq-artemis-cli and 13 more0:2.9.0-6.redhat_00016.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-fge-btf0:1.2.0-1.redhat_00007.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-fge-msg-simple0:1.1.0-1.redhat_00007.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-hal-console0:3.2.11-1.Final_redhat_00001.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-hibernate, eap7-hibernate-core, eap7-hibernate-java8 and 2 more0:5.3.18-2.Final_redhat_00002.1.el6eapRHSA-2020:5175
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-hibernate-validator, eap7-hibernate-validator-cdi0:6.0.21-1.Final_redhat_00001.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-jackson-core, eap7-jackson-jaxrs-base, eap7-jackson-annotations and 5 more0:2.10.4-1.redhat_00002.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-jackson-coreutils0:1.6.0-1.redhat_00006.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-jackson-modules-base, eap7-jackson-module-jaxb-annotations0:2.10.4-3.redhat_00002.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-jasypt0:1.9.3-1.redhat_00002.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-jboss-marshalling, eap7-jboss-marshalling-river0:2.0.10-1.Final_redhat_00001.1.el6eapRHSA-2020:5340
Red Hatjboss_enterprise_application_platform:7.3::el6eap7-jboss-remoting0:5.0.19-1.Final_redhat_00001.1.el6eapRHSA-2020:5340
64 more for Red Hat in the JSON and on Red Hat's page.
SUSEManager Server Module 4.1hibernate55.3.7-3.6.1SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1mgr-libmod4.1.10-3.25.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1mgr-osad4.1.6-2.12.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1prometheus-formula0.3.5-3.15.1SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1py27-compat-salt3000.3-6.18.1SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacecmd4.1.16-4.33.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacewalk-admin4.1.11-3.18.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacewalk-backend4.1.30-4.47.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacewalk-certs-tools4.1.20-3.25.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacewalk-client-tools4.1.11-4.18.2SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacewalk-java4.1.43-3.63.1SUSE-SU-2022:0225-1
SUSEManager Server Module 4.1spacewalk-reports4.1.5-3.9.1SUSE-SU-2022:0225-1
37 more for SUSE in the JSON and on SUSE's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

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 reason there are two components for RHPAM and RHDM.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
EAP 7.3.3hibernate-coreFixed 2020-11-23RHSA-2020:5174
Red Hat build of Quarkus 1.7.5 SP1hibernate-coreFixed 2020-12-01RHSA-2020:5302
Red Hat Fuse 7.9hibernate-coreFixed 2021-08-11RHSA-2021:3140
Red Hat Integrationhibernate-coreFixed 2021-05-19RHSA-2021:2039
Red Hat JBoss Enterprise Application Platform 7hibernate-coreFixed 2020-12-03RHSA-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.el7Fixed 2025-06-25RHSA-2025:9582
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-hibernate-0:5.1.17-3.Final_redhat_00004.1.ep7.el7Fixed 2025-06-25RHSA-2025:9582
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-jackson-databind-0:2.8.11.6-3.SP1_redhat_00003.1.ep7.el7Fixed 2025-06-25RHSA-2025:9582
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-jboss-ejb-client-0:4.0.12-1.Final_redhat_00002.1.ep7.el7Fixed 2025-06-25RHSA-2025:9582
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-netty-0:4.1.63-2.Final_redhat_00003.1.ep7.el7Fixed 2025-06-25RHSA-2025:9582
A-MQ Clients 2hibernate-coreNot affected
Red Hat BPM Suite 6hibernate-coreOut of support scope
Red Hat Decision Manager 7hibernate-core-kie-server-ee7Will not fix
Red Hat Integration Camel K 1hibernate-coreNot affected
Red Hat JBoss BRMS 5hibernate-coreOut of support scope
Red Hat JBoss BRMS 6hibernate-coreOut of support scope
Red Hat JBoss Data Virtualization 6hibernate-coreOut of support scope
Red Hat JBoss Enterprise Application Platform 5hibernate-coreOut of support scope
Red Hat JBoss Enterprise Application Platform 6hibernate-coreOut of support scope
Red Hat JBoss Fuse 6hibernate-coreOut of support scope
96 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2020-25638.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON