Vulnerabilities / CVE-2021-42392

critical

CVE-2021-42392

h2: Remote Code Execution in Console

Published Modified CWE 502
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA. Rated lower by Ubuntu (high), Red Hat (medium).

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.

Affected packages and fixed versions

SourcePackageFixed in
maven::GitHub Security Advisory Mavencom.h2database:h22.0.206
debian 10h2database1.4.197-4+deb10u1
debian 11h2database1.4.197-4+deb11u1
debian 12h2database2.1.210-1
debian 13h2database2.1.210-1
debian 14h2database2.1.210-1
debian 9h2database1.4.193-1+deb9u1
echoh2database2.1.210-1
ubuntu 16.04-ESMh2database1.4.191-1ubuntu0.1~esm1
ubuntu 18.04-ESMh2database1.4.196-2ubuntu0.1~esm1
ubuntu 20.04h2database1.4.197-4+deb10u1build0.20.04.1
ubuntu 20.04-ESMh2database1.4.197-4+deb10u1build0.20.04.1
Show all 14 entries from 14 sources
SourcePackageFixed in
maven::GitHub Security Advisory Mavencom.h2database:h22.0.206
debian 10h2database1.4.197-4+deb10u1
debian 11h2database1.4.197-4+deb11u1
debian 12h2database2.1.210-1
debian 13h2database2.1.210-1
debian 14h2database2.1.210-1
debian 9h2database1.4.193-1+deb9u1
echoh2database2.1.210-1
ubuntu 16.04-ESMh2database1.4.191-1ubuntu0.1~esm1
ubuntu 18.04-ESMh2database1.4.196-2ubuntu0.1~esm1
ubuntu 20.04h2database1.4.197-4+deb10u1build0.20.04.1
ubuntu 20.04-ESMh2database1.4.197-4+deb10u1build0.20.04.1
ubuntu 21.10h2database1.4.197-4+deb10u1build0.21.10.1
ubuntu 22.04h2database2.1.210+really1.4.197-1

References

All 17 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.