# CVE-2022-45868: Password exposure in H2 Database

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.4
- **CVSS:** 8.4 (v3.1, CNA) `CVSS:3.1/AC:L/AV:L/A:H/C:H/I:H/PR:N/S:U/UI:N`
- **CVSS metrics:** Attack complexity: Low; Attack vector: Local; Availability impact: High; Confidentiality impact: High; Integrity impact: High; Privileges required: None; Scope: Unchanged; User interaction: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-312
- **Aliases:** GHSA-22wj-vf5f-wrvj
- **Published:** 2022-11-23T00:00:00.000Z
- **Modified:** 2026-09-10T03:49:46.817Z

## Who should check

- Projects that depend on Maven package com.h2database:h2 (\>= 1.4.198, \< 2.2.220)
- Anyone running n/a (versions: see the vendor advisory)

## Description

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. Consequently, a local user (or an attacker that has obtained local access through some means) would be able to discover the password by listing processes and their arguments. NOTE: the vendor states "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." Nonetheless, the issue was fixed in 2.2.220.

## Affected and fixed versions

- Maven `com.h2database:h2`: affected \>= 1.4.198, \< 2.2.220; fixed 2.2.220 (osv)
- n/a: see vendor advisory (nvd)

## Mitigation

- Upgrade com.h2database:h2 to 2.2.220 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-45868. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-45868.md
Affected: com.h2database:h2 >= 1.4.198, < 2.2.220
Fixed in: 2.2.220

Steps:
1. Search this machine and project for com.h2database:h2 (Maven), n/a: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-45868 being exploited?

There is no confirmed exploitation: CVE-2022-45868 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-45868?

High: CVSS 8.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-45868?

com.h2database:h2 \>= 1.4.198, \< 2.2.220.

### Is there a fix for CVE-2022-45868?

Yes. Fixed in 2.2.220. Upgrade com.h2database:h2 to 2.2.220 or later.

### How do I check if I'm affected by CVE-2022-45868?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/advisories/GHSA-22wj-vf5f-wrvj>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2022-45868>
- patch: <https://github.com/h2database/h2database/pull/3833>
- patch: <https://github.com/h2database/h2database/commit/581ed18ff9d6b3761d851620ed88a3994a351a0d>
- exploit: <https://sites.google.com/sonatype.com/vulnerabilities/sonatype-2022-6243>
- other: <https://github.com/h2database/h2database/blob/96832bf5a97cdc0adc1f2066ed61c54990d66ab5/h2/src/main/org/h2/server/web/WebServer.java#L346-L347>
- other: <https://github.com/h2database/h2database/issues/3686>
- other: <https://github.com/h2database/h2database/releases/tag/version-2.2.220>
- other: <https://github.com/h2database/h2database>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-45868>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-22wj-vf5f-wrvj> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-45868> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-45868>
