Patchfirst
CVE-2021-42392 Public exploit EPSS 83.2%

The org.h2.util.JdbcUtils.getConnection method of the H2 database takes as parameters the class name of the driver and…

Fix:upgrade h2 to 2.1.210 or later also fixes CVE-2022-23221 Details ↓

h2database · h2

Summary

The org.h2.util.JdbcUtils.getConnection method in the H2 database product accepts a driver class name and a database URL from callers, and does not restrict them to safe values. An attacker can supply a JNDI driver name and a URL pointing to an LDAP or RMI server so that the database connects there and triggers remote code execution, and the H2 Console provides a path to this that requires no authentication.

Official description · CVE.org

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.

Breakdown
26.3 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Public exploit code (PoC-in-GitHub) appeared 2 days after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+2 days

4 fixes in h2 over 11 months. The latest fix listed for h2 is 2.2.220.

Fixes in h2Maven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.0.202CVE-2021-2346310 Dec 2021
  2. 2.0.206CVE-2021-423927 Jan 2022
  3. 2.1.210CVE-2022-2322119 Jan 2022
  4. 2.2.220CVE-2022-4586823 Nov 2022Latest listed

Affected versions and fixes

as published in the CVE record

h2database h2

Affected: >= 1.1.000

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: com.h2database:h2.

Mavencom.h2database:h2GHSA-h376-j262-vhq6

Upgrade to 2.1.210 or later

Fixes this CVE and 1 other known vulnerability in this package (CVE-2022-23221).

Set the version to 2.1.210 or later in your pom.xml or build.gradle.

First fixed in 2.0.206 for CVE-2021-42392.

Affected versions

If you runUpgrade to
1.1.100 up to 2.0.2062.1.210first fix for this CVE: 2.0.206

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 3 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

7 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close