CriticalGHSA-45hx-wfhj-473xCVE-2022-23221

Arbitrary code execution in H2 Console

Published 21 Jan 2022 · Updated 16 Feb 2024

Is your project on an affected com.h2database:h2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.1.210
Fixed in
2.1.210
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=com.h2database:h2 -DdepVersion=2.1.210 -DforceVersion=true

Details

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.

Is GHSA-45hx-wfhj-473x in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected com.h2database:h2, and gives you the command that fixes it.

More advisories for com.h2database:h2

  • HighCVE-2022-45868Password exposure in H2 Database · 23 Nov 2022
  • CriticalCVE-2021-42392RCE in H2 Console · 6 Jan 2022
  • HighCVE-2021-23463Improper Restriction of XML External Entity Reference in com.h2database:h2. · 16 Dec 2021
com.h2database:h2 security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.