Cleartext Password Exposure in H2 Database Engine - CVE-2022-45868

h2database Updated 02 Oct 2025

Summary

23/11/2022
N/A
No i
Unrated
Not published

DEBIAN-CVE-2022-45868: The web-based admin console in H2 Database Engine before 2.2.220 can be started via the CLI with the argument -webAdminPassword, which allows the user to specify the password in cleartext for the web admin console. Affects h2database versions 1.4.197-4 – 2.2.220-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

H2 Database Engine is a popular open-source relational database management system written in Java. It is known for its lightweight nature, fast performance, and ease of use, making it suitable for both development and production environments. The database engine includes a web-based admin console that allows users to manage databases through a graphical interface. However, a vulnerability was discovered that allows sensitive information, specifically passwords, to be exposed in cleartext when starting the console with certain command-line arguments.

Vulnerability Detail

The vulnerability arises from the ability to start the H2 Database Engine's web-based admin console with the '-webAdminPassword' argument, which allows the user to specify the admin password in cleartext. This means that any local user or attacker with local access can list the running processes and their arguments, potentially exposing the admin password. The vendor has noted that this is not a flaw in the H2 Console itself, as best practices dictate that passwords should not be passed via the command line. Nonetheless, the issue poses a security risk, especially in environments where multiple users have access to the system.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, avoid using the '-webAdminPassword' argument when starting the H2 Database Engine's web console. Instead, consider using environment variables or configuration files to securely manage passwords without exposing them in command-line arguments.

Conclusion

CVE-2022-45868 presents a significant risk by allowing the exposure of admin passwords in cleartext through command-line arguments. Users of H2 Database Engine should promptly update to version 2.2.220 or later to mitigate this vulnerability. Additionally, following best practices for password management and access control is essential to maintain database security.

See every vulnerability recorded for h2database →

Share this vulnerability

FAQ

CVE-2022-45868 is a vulnerability in the H2 Database Engine that allows passwords to be exposed in cleartext when starting the web admin console with specific command-line arguments.

If an attacker gains local access to your system, they could potentially discover the admin password, leading to unauthorized access to your databases.

All versions of H2 Database Engine prior to 2.2.220 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

If an immediate update is not possible, ensure that you do not use the '-webAdminPassword' argument and consider implementing additional security measures to restrict local access to your system.

Related vulnerabilities

Recent vulnerabilities recorded for h2database.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback