Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Log4Shell-Like Vulnerability Found in Popular H2 Database

A critical, unauthenticated remote code execution vulnerability has been impacting the H2 database console since 2008.

An open-source Java SQL database, H2 is an in-memory solution that eliminates the need to store data on disk, and is one of the most popular Maven packages, having roughly 7,000 artifact dependencies,

A critical, unauthenticated remote code execution vulnerability has been impacting the H2 database console since 2008.

An open-source Java SQL database, H2 is an in-memory solution that eliminates the need to store data on disk, and is one of the most popular Maven packages, having roughly 7,000 artifact dependencies,

Tracked as CVE-2021-42392, the newly disclosed vulnerability has been lurking in H2 since version 1.1.100, which was released in 2008. All versions through 2.0.204 (released in December 2021) are affected.

The new bug, JFrog says, has the same root cause as the famous Log4Shell bug – they both involve the Java Naming and Directory Interface (JNDI) lookup feature – yet its impact isn’t as widespread, mainly because the console isn’t always used with the H2 database and because the H2 console listens to localhost by default.

However, the severity of the issue becomes critical when the H2 console is exposed to the LAN or WAN, given that it could be exploited to execute code remotely, without authentication.

“H2 Console doesn’t accept remote connections by default. If remote access was enabled explicitly and some protection method (such as security constraint) wasn’t set, an intruder can load own custom class and execute its code in a process with H2 Console (H2 Server process or a web server with H2 Console servlet),” the H2 maintainers explain.

The issue exists because unfiltered attacker-controlled URLs are passed to a lookup function, which essentially allows for the injection of Java code remotely, thus leading to RCE.

JFrog’s security researchers, who identified the vulnerability, explain that the most severe of the possible attack vectors is through the H2 console itself, mainly because one can use public search tools to locate WAN-facing vulnerable consoles.

Advertisement. Scroll to continue reading.

The researchers also identified a series of SQL-based attack vectors, some requiring authentication with high privileges, such as those of an administrator. The built-in H2 shell can also be leveraged as an attack vector, though the scenario is highly unlikely, JFrog says.

The vulnerability was addressed with the release of H2 database version 2.0.206 and all those who use the H2 console are advised to upgrade to this release as soon as possible.

“Since version 2.0.206 H2 Console and linked tables explicitly forbid attempts to specify LDAP URLs for JNDI. Only local data sources can be used,” the H2 maintainers explain.

Related: ICS Vendors Respond to Log4j Vulnerabilities

Related: New Google Tool Helps Developers Visualize Dependencies of Open Source Projects

Related: GitHub Patches Security Flaws in Core Node.js Dependencies

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

Vulnerabilities

The latest Chrome update brings patches for eight vulnerabilities, including seven reported by external researchers.