H2 Database JNDI Lookup RCE (CVE-2021-42392)

critical Nessus Plugin ID 158252

Synopsis

The web interface for a database management system is affected by a a remote code execution vulnerability.

Description

The remote H2 database is affected by a remote code execution vulnerability by allowing JNDI lookup on user-supplied data. An unauthenticated, remote attacker can pass a specially crafted JNDI driver name and JDBC URL to the org.h2.util.JdbcUtils.getConnection method to cause remote code execution.

Solution

Upgrade H2 database to version 2.0.206 or later.

See Also

http://www.nessus.org/u?e61823cb

http://www.nessus.org/u?4a30ff43

http://www.nessus.org/u?e9e02c2c

Plugin Details

Severity: Critical

ID: 158252

File Name: h2_database_cve-2021-42392.nbin

Version: 1.51

Type: remote

Family: Databases

Published: 2/22/2022

Updated: 11/12/2024

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2021-42392

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:h2database:h2

Required KB Items: installed_sw/h2_database_web

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 1/4/2022

Vulnerability Publication Date: 1/4/2022

Reference Information

CVE: CVE-2021-42392