CVE-2021-42392: Critical severity h2database H2 vulnerability

Published Jan 4, 2022
·
Updated

A flaw was found in h2. The org.h2.util.JdbcUtils.getConnection method of the H2 database takes as parameters the class name of the driver and URL of the database. This flaw allows an attacker to use this URL to send another server’s code, causing remote code execution. This issue is exploited through various attack vectors, most notably through the H2 Console, which leads to unauthenticated remote code execution.

Other sources

The org.h2.util.JdbcUtils.getConnection method of the H2 database takes as parameters the class name of the driver and URL of the database. An attacker may pass a JNDI driver name and a URL leading to a LDAP or RMI servers, causing remote code execution. This can be exploited through various attack vectors, most notably through the H2 Console which leads to unauthenticated remote code execution.

Affected Software

16 affected componentsFixes available
redhat/eap7-h2database<0:1.4.197-2.redhat_00004.1.el8ea
0:1.4.197-2.redhat_00004.1.el8ea
redhat/eap7-h2database<0:1.4.197-2.redhat_00004.1.el7ea
0:1.4.197-2.redhat_00004.1.el7ea
redhat/rh-sso7-keycloak<0:15.0.8-1.redhat_00001.1.el7
0:15.0.8-1.redhat_00001.1.el7
redhat/rh-sso7-keycloak<0:15.0.8-1.redhat_00001.1.el8
0:15.0.8-1.redhat_00001.1.el8
redhat/rh-sso7-keycloak<0:18.0.3-1.redhat_00001.1.el7
0:18.0.3-1.redhat_00001.1.el7
redhat/rh-sso7-keycloak<0:18.0.3-1.redhat_00001.1.el8
0:18.0.3-1.redhat_00001.1.el8
redhat/rh-sso7<0:1-5.el9
0:1-5.el9
redhat/rh-sso7-javapackages-tools<0:6.0.0-7.el9
0:6.0.0-7.el9
redhat/rh-sso7-keycloak<0:18.0.3-1.redhat_00001.1.el9
0:18.0.3-1.redhat_00001.1.el9
debian/h2database
1.4.197-4+deb10u11.4.197-4+deb11u12.1.214-12.2.220-1
redhat/h2<2.0.206
2.0.206
h2database H2>=1.1.000<=2.0.204
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Oracle Communications Cloud Native Core Policy=1.15.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/eap7-h2database to a version that resolves this vulnerability.

    Fixed in 0:1.4.197-2.redhat_00004.1.el8ea
  2. Upgrade

    Upgrade redhat/eap7-h2database to a version that resolves this vulnerability.

    Fixed in 0:1.4.197-2.redhat_00004.1.el7ea
  3. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:15.0.8-1.redhat_00001.1.el7
  4. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:15.0.8-1.redhat_00001.1.el8
  5. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:18.0.3-1.redhat_00001.1.el7
  6. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:18.0.3-1.redhat_00001.1.el8
  7. Upgrade

    Upgrade redhat/rh-sso7 to a version that resolves this vulnerability.

    Fixed in 0:1-5.el9
  8. Upgrade

    Upgrade redhat/rh-sso7-javapackages-tools to a version that resolves this vulnerability.

    Fixed in 0:6.0.0-7.el9
  9. Upgrade

    Upgrade redhat/rh-sso7-keycloak to a version that resolves this vulnerability.

    Fixed in 0:18.0.3-1.redhat_00001.1.el9
  10. Upgrade

    Upgrade debian/h2database to a version that resolves this vulnerability.

    Fixed in 1.4.197-4+deb10u1Fixed in 1.4.197-4+deb11u1Fixed in 2.1.214-1Fixed in 2.2.220-1
  11. Upgrade

    Upgrade redhat/h2 to a version that resolves this vulnerability.

    Fixed in 2.0.206

Event History

Jan 4, 2022
CVE Published
12:00 AM
Jan 7, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Jan 11, 2022
Data Sourced
via Red Hat·04:33 PM
DescriptionSeverityAffected Software
Jan 17, 2022
Data Sourced
07:42 PM
SeverityAffected Software
Jul 26, 58337
Event
05:09 AM
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 CVE-2021-42392?

CVE-2021-42392 is a vulnerability found in the h2 database that allows remote code execution.

2

How severe is CVE-2021-42392?

CVE-2021-42392 has a severity rating of 9.8, which is considered critical.

3

How can I fix CVE-2021-42392?

To fix CVE-2021-42392, you should update the h2 database to version 2.0.206 or apply the recommended patch provided by Red Hat.

4

Where can I find more information about CVE-2021-42392?

You can find more information about CVE-2021-42392 on the GitHub security advisory page and the Red Hat security advisory page.

5

What is the Common Weakness Enumeration (CWE) for CVE-2021-42392?

The Common Weakness Enumeration (CWE) for CVE-2021-42392 is CWE-502.

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