WaratekVRT Sign in

CVE-2021-42392 h2

Affected softwareh2
Severity9.8 Critical CVSS 3.1 2 scores
Fixed in2.0.206
WeaknessDeserialization of untrusted data (CWE-502)
Published10 Jan 2022
Updated17 Jun 2026

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.

Exploitation status

Working exploit published

A reviewed exploit catalogue lists ready-to-run exploit code for this CVE.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC 2 indexed Published artifacts you can open, in GitHub PoC, Nuclei; first seen 2022-01-09.
  • EPSS 83% chance in 30 days A model's forecast, not a report of exploitation. Higher than 99.7% of all scored CVEs.
IndexArtifactStarsFirst seen
GitHub PoC cybersecurityworks553/CVE-2021-42392-Detect 7 2022-01-09
Nuclei H2 Database Console - JNDI Injection RCE

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR deserialization security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-502: Deserialization of Untrusted Data.
Candidate fix https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6 : the maintainers' own security advisory: names the version that fixes it, so the fix is the difference between two releases

How to mitigate CVE-2021-42392

Upgrade h2 to 2.0.206 or later. Until you can, Waratek RASP blocks exploitation with its deserialization and process rules. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

9.8 CRITICAL v3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 9.8 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H NVD Primary published
CVSS 2.0 10.0 none AV:N/AC:L/Au:N/C:C/I:C/A:C NVD Primary

Affected software and releases

Oracle advisories

AdvisoryTypeQuarterProducts Oracle names in its risk matrix
Oracle Critical Patch Update January 2024 ↗ CPU 2024-Q1 Oracle Fusion Middleware / B2B Engine (H2 Database) (12.2.1.4.0)
Oracle Critical Patch Update April 2022 ↗ CPU 2022-Q2 Oracle Communications / Policy (H2) (1.15.0)

Oracle components and versions

FamilyComponentVersions, as Oracle lists themRead as
Oracle Communications Policy (H2) 1.15.0 1.15.0
Oracle Fusion Middleware B2B Engine (H2 Database) 12.2.1.4.0 12.2.1.4.0

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
com.h2database:h2 1.1.100 2.0.206 unbounded

Products and versions

4 products, 6 version entries
SourceVendorProductSchemeAffected versions
osv com.h2database h2 generic ≥ 1.1.100 and < 2.0.206
nvd debian debian linux generic 9.0 · 10.0 · 11.0
nvd h2database h2 generic ≥ 1.1.0 and ≤ 2.0.204
nvd oracle communications cloud native core policy generic 1.15.0

References

URLTags
https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6 advisory
https://github.com/h2database/h2database PACKAGE
https://github.com/h2database/h2database/releases/tag/version-2.0.206 WEB
https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console WEB
https://lists.debian.org/debian-lts-announce/2022/02/msg00017.html WEB
https://security.netapp.com/advisory/ntap-20220119-0001 WEB
https://www.debian.org/security/2022/dsa-5076 WEB
https://www.oracle.com/security-alerts/cpuapr2022.html WEB
https://www.secpod.com/blog/log4shell-critical-remote-code-execution-vulnerability-in-h2database-console WEB
https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/ Exploit, Technical Description, Vendor Advisory

Timeline

Published2022-01-10By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.