CVE-2022-23221 Arbitrary code execution in H2 Console

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code in H2 Console via crafted JDBC URLs when specific settings are enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-23221?

CVE-2022-23221 is a critical code injection vulnerability in Debian Debian Linux, published on 19 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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 than CVE-2021-42392.

Weakness: CWE-88

Which versions are affected by CVE-2022-23221?

2 open source packages ship an affected version, including com.h2database:h2. It affects 3 products.

PackageAffectedFixed in
com.h2database:h2 MavenAll versions2.1.210
com.h2database:h2 MavenAll versions2.1.210

Products include Debian Debian Linux, H2database H2, Oracle Communications Cloud Native Core Console.

How do I fix CVE-2022-23221?

Upgrade com.h2database:h2 to 2.1.210 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2022-23221 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-23221 exists.

Public exploit code: 2 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as CLSA-2026-1793128778, DEBIAN-CVE-2022-23221, GHSA-45hx-wfhj-473x, UBUNTU-CVE-2022-23221.

Is CVE-2022-23221 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free