Remote Code Execution Vulnerability in H2Database Package

h2database Updated 02 Oct 2025

Summary

19/01/2022
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2022-23221: H2 Console before 2.1.210 allows remote attackers to execute arbitrary code via a jdbc:h2:mem JDBC URL containing the IGNORE_UNKNOWN_SETTINGS=TRUE;FORBID_CREATION=FALSE;INIT=RUNSCRIPT substring, a different vulnerability... Affects h2database versions < 1.4.197-4+deb11u1. Fixed in 1.4.197-4+deb11u1. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

H2Database is a popular open-source relational database management system written in Java. It is known for its lightweight nature and is often used for development and testing purposes. The package provides a console interface for database management, allowing users to execute SQL commands and manage database schemas. However, a vulnerability has been identified in versions prior to 2.1.210 that allows remote attackers to execute arbitrary code through specific JDBC URL configurations.

Vulnerability Detail

The vulnerability, identified as CVE-2022-23221, affects the H2 Console prior to version 2.1.210. It allows remote attackers to execute arbitrary code by crafting a malicious JDBC URL that includes the parameters IGNORE_UNKNOWN_SETTINGS=TRUE;FORBID_CREATION=FALSE;INIT=RUNSCRIPT. This vulnerability poses a significant risk as it can lead to unauthorized access and control over the database environment, potentially compromising sensitive data and application integrity.

How To Fix

Minimum fixed version

1.4.197-4+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade h2database

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the vulnerable JDBC URL configurations that include the IGNORE_UNKNOWN_SETTINGS and FORBID_CREATION parameters until the package can be updated.

Conclusion

The H2Database package has a critical vulnerability that allows remote code execution through specific JDBC URL configurations. It is crucial for users to update to the patched versions to mitigate the risks associated with this vulnerability. Regular monitoring and updates are essential for maintaining application security.

See every vulnerability recorded for h2database →

Share this vulnerability

FAQ

CVE-2022-23221 is a vulnerability in the H2Database package that allows remote code execution through malicious JDBC URLs.

Versions of H2Database prior to 2.1.210 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The risks include unauthorized access to the database, potential data breaches, and the ability for attackers to execute arbitrary code on the server.

To protect your application, update the H2Database package to the latest patched version and avoid using the vulnerable JDBC URL configurations.

Related vulnerabilities

Recent vulnerabilities recorded for h2database.

How To Fix

Minimum fixed version

1.4.197-4+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade h2database

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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