CVE-2021-42392
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.
What to do
Likely to be exploited: EPSS gives a 83% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Debian, Maven, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | h2database | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | h2database | Fixed | 2.1.210+really1.4.197-1 | UBUNTU-CVE-2021-42392 |
| Ubuntu 20.04 | h2database | Fixed | 1.4.197-4+deb10u1build0.20.04.1 | UBUNTU-CVE-2021-42392 |
| Ubuntu 18.04 | h2database | Fix pending | 1.4.196-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-42392 |
| Ubuntu 16.04 | h2database | Fix pending | 1.4.191-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-42392 |
| Debian 14 | h2database | Fixed | 2.1.210-1 | DEBIAN-CVE-2021-42392 |
| Debian 13 | h2database | Fixed | 2.1.210-1 | DEBIAN-CVE-2021-42392 |
| Debian 12 | h2database | Fixed | 2.1.210-1 | DEBIAN-CVE-2021-42392 |
| Maven library | com.h2database:h2 | Fixed | 2.0.206 | GHSA-h376-j262-vhq6 |
What the vendor says
As published in the CVE record by JFROG, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- h2database h2: affected: 1.1.000 and later
Vendor advisories:
- https://www.debian.org/security/2022/dsa-5076 (vendor-advisory)
References
- https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6
- https://lists.debian.org/debian-lts-announce/2022/02/msg00017.html
- https://www.debian.org/security/2022/dsa-5076
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/
- https://security.netapp.com/advisory/ntap-20220119-0001/
- https://www.secpod.com/blog/log4shell-critical-remote-code-execution-vulnerability-in-h2database-console/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.