← Vulnerability feed

Vulnerability record · CVE-2021-42392 · published 10 January 2022

CVE-2021-42392: H2 database JNDI lookup flaw allows unauthenticated remote code execution

H2database · H2

The org.h2.util.JdbcUtils.getConnection method in the H2 database accepts a driver class name and database URL from the caller. An attacker can supply a JNDI driver name and a URL pointing to an LDAP or RMI server, causing the server to load and execute attacker-controlled code. The H2 Console is the most notable vector and is reachable without authentication, making this a critical remote code execution issue.

9.8 CVSS 3.1 Critical EPSS 83% · top 0.3% CWE-502 · Deserialization of untrusted data
9.8CVSS 3.1 base score, v2 10.0
83%EPSS exploitation probability, 30 days
NoNot in CISA KEV
3Affected product versions listed by NVD
14References, 2 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

critical priorityCVSS 9.8 with no authentication or user interaction required, unauthenticated RCE via the H2 Console, and a very high EPSS score with public exploit detail.

What it is

The org.h2.util.JdbcUtils.getConnection method in the H2 database accepts a driver class name and database URL from the caller. An attacker can supply a JNDI driver name and a URL pointing to an LDAP or RMI server, causing the server to load and execute attacker-controlled code. The H2 Console is the most notable vector and is reachable without authentication, making this a critical remote code execution issue.

Impact

An attacker gains remote code execution in the context of the process running H2, which can lead to full host compromise, data theft or lateral movement. No privileges are required on the target.

Attack surface

Reachable over the network via the H2 Console or any other interface that passes attacker-controlled driver names and URLs into JdbcUtils.getConnection. The CVSS vector shows no authentication and no user interaction required.

Exploitation

Not listed in CISA KEV, but EPSS is 0.63211 (99th percentile) and references include an exploit-tagged JFrog technical writeup, indicating public exploitation detail exists. No ransomware association is documented.

What to do

  • Upgrade H2 to a version that blocks JNDI-based driver loading, per the vendor security advisory GHSA-h376-j262-vhq6.
  • Apply the Oracle CPU April 2022 and Debian DSA-5076 updates where H2 is bundled or packaged.
  • Disable or restrict network access to the H2 Console; do not expose it to untrusted networks.
  • Run H2 with least privilege and restrict outbound LDAP/RMI traffic from hosts running H2.
  • Audit applications that embed H2 for user-controlled JDBC URL or driver name input.

Detection

  • Monitor H2 Console access logs for requests supplying driver or URL parameters containing ldap:// or rmi:// schemes.
  • Alert on outbound LDAP or RMI connections originating from hosts that run H2.
  • Look for JNDI-related class loading or unexpected child processes spawned by Java processes hosting H2.
  • Search application logs for JdbcUtils.getConnection errors or stack traces referencing JNDI driver names.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

3 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-42392 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2023-46604Apache ActiveMQ OpenWire deserialization remote code executionThe Java OpenWire protocol marshaller in Apache ActiveMQ deserializes untrusted data, letting an attacker manipulate serialized class types so the br…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2021-42392), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.