CVE-2021-42392

NameCVE-2021-42392
DescriptionThe 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDLA-2923-1, DSA-5076-1
Debian Bugs1003894

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
h2database (PTS)stretch1.4.193-1vulnerable
stretch (security)1.4.193-1+deb9u1fixed
buster, buster (security)1.4.197-4+deb10u1fixed
bullseye (security), bullseye1.4.197-4+deb11u1fixed
bookworm, sid2.1.212-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
h2databasesourcestretch1.4.193-1+deb9u1DLA-2923-1
h2databasesourcebuster1.4.197-4+deb10u1DSA-5076-1
h2databasesourcebullseye1.4.197-4+deb11u1DSA-5076-1
h2databasesource(unstable)2.1.210-11003894

Notes

https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6
https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/
Fixed by https://github.com/h2database/h2database/commit/41dd2a4cf89da9dd18239debbf73f88da6184ec7
https://github.com/h2database/h2database/commit/956c6241868332c5b440f5d55ea8fdc1e51ae4fd

Search for package or bug name: Reporting problems