Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
CRITICAL severity

CVE-2021-42392 — h2

CRITICAL

CVE-2021-42392 is a critical-severity (CVSS 9.8) Deserialization of Untrusted Data vulnerability in com.h2database:h2. 3 public exploit references exist, so weaponization risk is real. A fix is available for com.h2database:h2 — see the affected versions and patch details below.

RCE in H2 Console

Also known asGHSA-h376-j262-vhq6
Published
Jan 10, 2022
Updated
Jul 8, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
3 known
Exploitation data as of Sep 24, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
83.2%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2021-42392 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE sits: patch-first territory.

Where this sits among everything scored

Of 378,567 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
☕com.h2database:h2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

Impact

H2 Console in versions since 1.1.100 (2008-10-14) to 2.0.204 (2021-12-21) inclusive allows loading of custom classes from remote servers through JNDI.

H2 Console doesn't accept remote connections by default. If remote access was enabled explicitly and some protection method (such as security constraint) wasn't set, an intruder can load own custom class and execute its code in a process with H2 Console (H2 Server process or a web server with H2 Console servlet).

It is also possible to load them by creation a linked table in these versions, but it requires ADMIN privileges and user with ADMIN privileges has full access to the Java process by design. These privileges should never be granted to untrusted users.

Patches

Since version 2.0.206 H2 Console and linked tables explicitly forbid attempts to specify LDAP URLs for JNDI. Only local data sources can be used.

Workarounds

H2 Console should never be available to untrusted users.

-webAllowOthers is a dangerous setting that should be avoided.

H2 Console Servlet deployed on a web server can be protected with a security constraint: https://h2database.com/html/tutorial.html#usingH2ConsoleServlet If webAllowOthers is specified, you need to uncomment and edit <security-role> and <security-constraint> as necessary. See documentation of your web server for more details.

References

This issue was found and privately reported to H2 team by JFrog Security's vulnerability research team with detailed information.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
☕Mavencom.h2database:h2≥ 1.1.100&&< 2.0.2062.0.206com.h2database:h2:2.0.206
Exploits & PoCs
3

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for com.h2database:h2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update com.h2database:h2 to 2.0.206 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-42392 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2021-42392 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2021-42392. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

How to detect CVE-2021-42392

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2021-42392 -u https://target
Template
H2 Database Console - JNDI Injection RCE
Severity
critical
Impact
An unauthenticated attacker can trigger an outbound JNDI lookup to a server they control, leading to remote code execution on the host running the H2 web console.
Remediation
Upgrade H2 database to version 2.0.206 or later, and disable the web console (spring.h2.console.enabled=false) or restrict access to it.

Template by ProjectDiscovery nuclei-templates (i-am-paradox), MIT licensed. View the full template. Scan only systems you are authorised to test.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

In OpenShift Container Platform (OCP) the openshift4/ose-metering-presto container image ships the vulnerable version of h2, but as it uses default configuration the impact by this vulnerability is LOW. Additionally, the Presto component is part of the OCP Metering stack and since the release of OCP 4.6, the Metering…

ProductFixed inAdvisory
Red Hat JBoss Enterprise Application Platform 7h2RHSA-2022:4922
Red Hat JBoss Enterprise Application Platform 7.3 EUS for RHEL 7eap7-hal-console-0:3.2.17-1.Final_redhat_00001.1.el7eapRHSA-2025:1747
Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 8eap7-h2database-0:1.4.197-2.redhat_00004.1.el8eapRHSA-2022:4919
Red Hat JBoss Enterprise Application Platform 7.4 on RHEL 7eap7-h2database-0:1.4.197-2.redhat_00004.1.el7eapRHSA-2022:4918
Red Hat Single Sign-On 7h2RHSA-2022:6787
Red Hat Single Sign-On 7.5 for RHEL 7rh-sso7-keycloak-0:15.0.8-1.redhat_00001.1.el7ssoRHSA-2022:6782
Red Hat Single Sign-On 7.5 for RHEL 8rh-sso7-keycloak-0:15.0.8-1.redhat_00001.1.el8ssoRHSA-2022:6783
Red Hat Single Sign-On 7.6.1h2RHSA-2022:7417

Frequently Asked Questions

### Impact H2 Console in versions since 1.1.100 (2008-10-14) to 2.0.204 (2021-12-21) inclusive allows loading of custom classes from remote servers through JNDI. H2 Console doesn't accept remote connections by default. If remote access was enabled explicitly and some protection method (such as security constraint) wasn't set, an intruder can load own custom class and execute its code in a process with H2 Console (H2 Server process or a web server with H2 Console servlet). It is also possible to load them by creation a linked table in these versions, but it requires `ADMIN` privileges and use
O3 Security · Impact-Aware SCA

Is CVE-2021-42392 in your dependencies?

O3 Security finds CVE-2021-42392 across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2021-42392: h2 (Critical 9.8) | O3 Security