Skip to content
OpenAdvisories
Critical · 9.8 Scanner template Public exploit CVE-2021-42392 EUVD-2022-0610GHSA-h376-j262-vhq6

RCE in H2 Console

Published Jan 7, 2022 · Updated Aug 4, 2024 · Assigned by JFROG

Description

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 products

VendorProductAffectedFixed
h2database h2 1.1.000 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 h2database 2.1.210-1 —
Debian 13 h2database 2.1.210-1 —
Debian 12 h2database 2.1.210-1 —
Debian 11 h2database 1.4.197-4+deb11u1 DSA-5076-1
Debian 10 h2database 1.4.197-4+deb10u1 DSA-5076-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 9 h2database 1.4.193-1+deb9u1 DLA-2923-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS h2database 2.1.210+really1.4.197-1 —
Ubuntu 20.04 LTS h2database 1.4.197-4+deb10u1build0.20.04.1 USN-5365-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS h2database 1.4.196-2ubuntu0.1~esm1 USN-6834-1
Ubuntu Pro 16.04 LTS h2database 1.4.191-1ubuntu0.1~esm1 USN-6834-1
ReleasePackageFixed inAdvisory
Red Hat Single Sign On 7 rh-sso7 +1 1-5.el9sso RHSA-2022:7411
Red Hat Single Sign On 7 rh-sso7-javapackages-tools +2 6.0.0-7.el9sso RHSA-2022:7411
Red Hat Single Sign On 7 rh-sso7-keycloak +1 15.0.8-1.redhat_00001.1.el7sso RHSA-2022:7411, RHSA-2022:7410, RHSA-2022:7409
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-hal-console 3.2.17-1.Final_redhat_00001.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jackson-core +7 2.10.4-2.redhat_00004.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jackson-databind +2 2.10.4-4.redhat_00004.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-jettison 1.5.2-2.redhat_00002.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-netty +1 4.1.63-4.Final_redhat_00002.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-resteasy +19 3.11.6-1.Final_redhat_00001.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-snakeyaml 1.33.0-1.SP1_redhat_00001.1.el7eap RHSA-2025:1747
Red Hat Jboss Enterprise Application Platform Eus 7 eap7-wildfly +4 7.3.12-3.GA_redhat_00002.1.el7eap RHSA-2025:1747
Red Hat JBoss EAP 7 eap7-activemq-artemis +15 2.16.0-9.redhat_00042.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-h2database 1.4.197-2.redhat_00004.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-hal-console 3.3.12-1.Final_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-jackson-databind 2.12.6.1-1.redhat_00003.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-jboss-xnio-base 3.8.7-1.SP1_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-netty +27 4.1.72-4.Final_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-undertow 2.2.17-2.SP4_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-wildfly +4 7.4.5-3.GA_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-wildfly-http-client +4 1.1.11-1.SP1_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918
Red Hat JBoss EAP 7 eap7-xerces-j2 2.12.0-3.SP04_redhat_00001.1.el7eap RHSA-2022:4919, RHSA-2022:4918

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven com.h2database:h2 >= 1.1.100, < 2.0.206 2.0.206 GHSA-h376-j262-vhq6

Advisories 13

References