Categories
CVE-2021-42392

Unsafe Deserialization in com.h2database:h2 (CVE-2021-42392)

Summary

Vulnerability in com.h2database:h2 (CVE-2021-42392). Successful exploitation can lead to full system takeover. Exploitable via ADMIN. Mitigation: upgrade to 2.0.206 or later.

Original description

The description as published by the source.

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 and 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 informatio…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2021-42392 has been found in com.h2database:h2.
Attackers can target a specific entry point like ADMIN over the network to misuse the product.
Successful exploitation can lead to full system takeover.
What to do: upgrade com.h2database:h2 to 2.0.206 or later.
If unsure, ask your IT team or search "com.h2database:h2 CVE-2021-42392" on the vendor's site.

CVE-2021-42392 (com.h2database:h2) — CWE-502
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: ADMIN / webAllowOthers
Patched: 2.0.206 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Unsafe deserialization (CWE-502) exists in com.h2database:h2. Attackers reach the vulnerable code path via ADMIN without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of com.h2database:h2. Attack surface: ADMIN / webAllowOthers.

🔥 Severity

Severity: ?. Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 2.0.206.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    Audit SBOM/dependencies for affected components.

    資産台帳・SBOM・依存マニフェストで com.h2database:h2 を使っているサービスとバージョンを洗い出す。

  2. 2
    Apply patch patch
    Upgrade com.h2database:h2 to 2.0.206

    ステージング環境で 2.0.206 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

Maven com.h2database:h2
[{"type":"ECOSYSTEM","events":[{"introduced":"1.1.100"},{"fixed":"2.0.206"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details