S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
critical·Product Based Web Vulnerabilities·Updated Sep 18, 2026

CVE-2021-42392 Scanner

CVE-2021-42392 Scanner - JNDI Injection vulnerability in H2 Database

Est. Time~10 seconds
Scan TypeGroup Scan
Targetsdomain, subdomain, ipv4
CostFree
5
Times Used
continuous scan runs
3.4k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
9.8
CVSS
Description

The org.h2.util.JdbcUtils.getConnection method of the H2 database takes as parameters the class name of the driver and URL of the database. An attacker may pass a JNDI driver name and a URL leading to a LDAP or RMI servers, causing remote code execution. This can be exploited through various attack vectors, most notably through the H2 Console which leads to unauthenticated remote code execution.

Attack Vector
-
Privileges Req.
-
User Interaction
-
Affected
h2by h2database
AFFECTED< *→SAFE ✓≥ *
Updated Oct 24, 2026View on NVD →
Detail

The H2 Database is widely used as an in-memory database within Java applications, providing a lightweight yet powerful solution for handling relational database operations. It is often employed in web applications, embedded systems, and unit testing to provide persistence without the overhead of traditional database systems. The H2 web console, part of the H2 Database package, offers users a graphical interface for database management and querying. This console can be enabled to allow users to interactively connect, execute SQL commands, and retrieve data from their H2-managed databases. As an embedded database engine, H2 is beneficial for rapid development cycles and applications requiring fast data access.

JNDI Injection is a critical vulnerability that allows an attacker to manipulate Java Naming and Directory Interface (JNDI) lookups in applications. By exploiting this flaw within the H2 Database web console, attackers can direct JNDI references to attack servers, leading to unauthorized operations. The vulnerability arises from insufficient validation on user input, particularly on URL parameters when establishing database connections. Remote attackers can exploit the web console when it is enabled, achieving Remote Code Execution (RCE) without requiring authentication.

For the JNDI Injection vulnerability in H2 Database, the weakness lies in the `JdbcUtils.getConnection` method, which accepts the driver name and database URL as parameters. Attackers may provide an LDAP or RMI URL pointing to a malicious server, allowing them to execute arbitrary code via JNDI lookups. The vulnerable endpoint is within the web console interface, essential for query execution on database entities in affected versions. As the console processes the manipulated URL, it triggers the malicious server and potentially executes harmful commands on the host system.

If an attacker successfully exploits the H2 Database JNDI Injection flaw, they could fully control the host system via remote code execution. Such control can lead to data theft, unauthorized data modification, or using the compromised host for further network attacks. Additionally, it can undermine data integrity within the database, inject malware, or create a persistent backdoor for future intrusions.

REFERENCES

Solution Advice
  • Upgrade H2 Database to version 2.0.206 or later to ensure the vulnerability is patched.
  • Disable the H2 web console using the configuration `spring.h2.console.enabled=false` to prevent exploitation through the console.
  • Implement network segmentation and firewall rules to restrict access to the H2 Database console to authorized administrators.
  • Regularly monitor and audit systems for suspicious activities or configuration changes related to JNDI lookups.
  • Conduct security awareness training to inform developers and administrators about the risks of insecure JNDI lookups and proper configuration practices.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2021-42392 Scanner - JNDI Injection vulnerability in H2 Database | S4E