CVE-2022-45868
H2 Database vulnerability analysis and mitigation

Overview

The H2 Database Engine before version 2.2.220 contains a security vulnerability where the web-based admin console can be started via the CLI with the argument -webAdminPassword, allowing users to specify the password in cleartext. This vulnerability was discovered in 2022 and assigned CVE-2022-45868. The issue affects H2 Database versions from 1.4.198 to versions before 2.2.220 (GitHub Advisory, Sonatype Report).

Technical details

The vulnerability stems from the ability to pass the web admin console password as a command-line argument using -webAdminPassword in plaintext. When the H2 Database is started with this parameter, the password becomes visible to any local user who can list running processes. The issue has a CVSS v3.1 base score of 7.8 (HIGH) with vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. The vulnerability is classified under CWE-312 (Cleartext Storage of Sensitive Information) (NVD).

Impact

If exploited, this vulnerability allows local users or attackers with local access to discover the password for the H2 web admin console by examining process listings. According to H2 developers, users with admin privileges can perform any action on the system that the owner of the H2 process would be able to execute. The command-line argument also overwrites any password specified in the configuration file, potentially bypassing more secure password storage methods (Sonatype Report).

Mitigation and workarounds

The issue was fixed in H2 Database version 2.2.220, which disallows plain webAdminPassword values and forces the usage of hashes. For systems that cannot be immediately upgraded, the recommended approach is to specify the admin password in the .h2.server.properties configuration file rather than using command-line arguments. The configuration file automatically stores passwords in a secure salted hash format when saved through the H2 Console settings (GitHub PR).

Community reactions

Initially, the H2 Database maintainers disputed this as a vulnerability, stating 'This is not a vulnerability of H2 Console... Passwords should never be passed on the command line and every qualified DBA or system administrator is expected to know that.' However, they later acknowledged the security implications and implemented a fix to prevent plaintext password usage (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related H2 Database vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2022-23221CRITICAL9.8
  • H2 DatabaseH2 Database
  • h2
NoYesJan 19, 2022
CVE-2021-42392CRITICAL9.8
  • H2 DatabaseH2 Database
  • com.h2database:h2
NoYesJan 10, 2022
CVE-2021-23463CRITICAL9.1
  • H2 DatabaseH2 Database
  • h2
NoYesDec 10, 2021
CVE-2022-45868HIGH7.8
  • H2 DatabaseH2 Database
  • h2
NoYesNov 23, 2022
CVE-2018-14335MEDIUM6.5
  • H2 DatabaseH2 Database
  • cpe:2.3:a:h2database:h2
NoYesJul 24, 2018

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management