SecurityContext

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

IdName
CWE-502Deserialization of Untrusted Data

Nuclei templates

IdUrl
CVE-2021-42392https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-42392.yaml

Hackerone

  • Reports: 7
  • Rank: 2406

Public exploits

UrlSourceAdded date
https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/nvd2022-01-10
https://github.com/Be-Innova/CVE-2021-42392-exploit-labpoc-in-github2025-05-08
https://github.com/cybersecurityworks553/CVE-2021-42392-Detectpoc-in-github2022-01-09

References

UrlSourceTags
https://www.oracle.com/security-alerts/cpuapr2022.htmlnvdPatch, Third Party Advisory
https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/nvdExploit, Technical Description, Vendor Advisory
https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6nvdMitigation, Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/02/msg00017.htmlnvdMailing List, Third Party Advisory
https://security.netapp.com/advisory/ntap-20220119-0001/nvdThird Party Advisory
https://www.debian.org/security/2022/dsa-5076nvdThird Party Advisory
https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-42392.yamlnuclei_templateNuclei 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
ProductAffectedUrl
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

RepositoryLink kindsIndexedUrl
h2database/h2databasepackage, releases, security_advisoryyes/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

Nuclei template