CVE-2021-42392CWE-502

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

published January 7, 2022

Patch now

High probability of exploitation

NVD has not assigned a CVSS score to this record. It sits in the 99.7th percentile for exploit probability.

CVSS
—
EPSS
83%
Percentile
99.7
In the wild
Unconfirmed
What it is

🚨 A crafty JNDI driver name can unleash chaos! An attacker can exploit H2's getConnection method to execute remote code without breaking a sweat. 🔥 Think of it like a delivery driver who gets to choose where to take a package without ever needing to verify the address — handing over complete control to whoever’s behind the wheel! If exploited, an attacker could execute arbitrary code on the server, manipulating data or even taking control of the entire system. This could result in data breaches or service disruption, leading to absolutely devastating consequences for affected organizations.

Put simply

Think of it like a delivery driver who gets to choose where to take a package without ever needing to verify the address — handing over complete control to whoever’s behind the wheel! This vulnerability allows an attacker to pass a JNDI driver name and a URL, redirecting connections to LDAP or RMI servers, which could lead to unauthorized remote code execution via the H2 Console.

What to do

If exploited, an attacker could execute arbitrary code on the server, manipulating data or even taking control of the entire system. This could result in data breaches or service disruption, leading to absolutely devastating consequences for affected organizations. To safeguard your systems, ensure that you disable the H2 Console if it's not needed, and consider validating any input passed to the getConnection method. Regularly update to the latest version of H2 to stay ahead of potential exploits. You've got this! By taking these steps, you'll be well on your way to securing your database. 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.83176 · 99.7th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2022-01-07T00:00Z
EPSS history
Timeline
  • 21 SEP 03:21Z
    EPSS moved 63% → 83%
    epss
  • 20 SEP 03:11Z
    EPSS moved 63% → 83%
    epss
  • 07 JAN 00:00Z
    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
    cvelistv5