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.
Unsafe deserialization (CWE-502) exists in com.h2database:h2. Attackers reach the vulnerable code path via ADMIN without authentication.
Check the vendor advisory for the affected versions of com.h2database:h2. Attack surface: ADMIN / webAllowOthers.
Severity: ?. Successful exploitation can lead to full system takeover.
Update to 2.0.206.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
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
-
1Identify exposure identify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで com.h2database:h2 を使っているサービスとバージョンを洗い出す。
-
2Apply patch patch
Upgrade com.h2database:h2 to 2.0.206ステージング環境で 2.0.206 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2021-42392 h2database Fixed in: 2.1.210-1
References
- advisory security.netapp.com
- advisory nvd.nist.gov
- package github.com
- report jfrog.com
- web github.com
- web lists.debian.org
- web debian.org
- web oracle.com
- web secpod.com
- web github.com
- web jfrog.com
- web security.netapp.com
- web secpod.com