CVE-2021-42392: H2 Database - Remote Code Execution
- Cve: CVE-2021-42392
- Name: H2 Database - Remote Code Execution
- 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.
- Impact: Attackers can execute arbitrary code remotely, potentially leading to full system compromise.
- Remediation: Update to the latest version of H2 database that addresses this issue or apply relevant security patches.
- Vulnerability type: jndi_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.83176
- Epss percentile: 0.99684
- Assignee: [email protected]
- Published at: 2022-01-10T14:10:23Z
- Age in days: 1778
- Modified at: 2026-06-17T04:09:45Z
- Patch available: yes
- Public exploits total: 3
- References total: 8
- Products total: 3
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-42392
- Nvd status: modified
- Checked, none or zero: known exploited entries, public exploits capped, rejected by nvd
- Not known: requirements
Cwe
| Id | Name |
|---|---|
| CWE-502 | Deserialization of Untrusted Data |
Nuclei templates
| Id | Url |
|---|---|
| CVE-2021-42392 | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-42392.yaml |
Hackerone
- Reports: 7
- Rank: 2406
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/ | nvd | 2022-01-10 |
| https://github.com/Be-Innova/CVE-2021-42392-exploit-lab | poc-in-github | 2025-05-08 |
| https://github.com/cybersecurityworks553/CVE-2021-42392-Detect | poc-in-github | 2022-01-09 |
References
| Url | Source | Tags |
|---|---|---|
| https://www.oracle.com/security-alerts/cpuapr2022.html | nvd | Patch, Third Party Advisory |
| https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/ | nvd | Exploit, Technical Description, Vendor Advisory |
| https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6 | nvd | Mitigation, Third Party Advisory |
| https://lists.debian.org/debian-lts-announce/2022/02/msg00017.html | nvd | Mailing List, Third Party Advisory |
| https://security.netapp.com/advisory/ntap-20220119-0001/ | nvd | Third Party Advisory |
| https://www.debian.org/security/2022/dsa-5076 | nvd | Third Party Advisory |
| https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-42392.yaml | nuclei_template | Nuclei Template |
| https://www.secpod.com/blog/log4shell-critical-remote-code-execution-vulnerability-in-h2database-console/ | nvd |
Products
Same in every row:
- Platform bound: no
- Sources: nvd
| Product | Affected | Url |
|---|---|---|
| h2database:h2 | >= 1.1.000, <= 2.0.204 | /v1/products/h2database/h2 |
| debian:debian_linux | = 11.0, = 10.0, = 9.0 | /v1/products/debian/debian_linux |
| oracle:communications_cloud_native_core_policy | = 1.15.0 | /v1/products/oracle/communications_cloud_native_core_policy |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| h2database/h2database | package, releases, security_advisory | yes | /v1/repositories/h2database/h2database |
Index
- Repositories: 389
- Repositories high signal: 228
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 3
- Public exploit first date: 2022-01-09
- Remote: yes
- Hackerone reports: 7
- Exposed hosts: 4706702
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, initial access since