Skip to content
Submit incident
AII-1002-44429
ReportedReported by fewer than three independent publishers, with no official finding.

H2O.ai remote code execution via unrestricted JDBC connection

H2O.ai H2O version 3.46.0.4 contains an unauthenticated remote code execution vulnerability in the ImportSQLTable endpoint that allows attackers to arbitrarily set JDBC connection URLs, leading to deserialization attacks and command execution on the victim's server.

6 September 2024 Β· H2O.ai Β· Security and cyberattacks
6 September 2024
AII-1002-444292 sources ↓
Quick facts
Organization
H2O.ai (subject)
Category
Security and cyberattacks
Source
gist.github.com
Date
6 September 2024
Drafted by
Raidu Incident Detection

What happened

H2O version 3.46.0.4 contains an unauthenticated remote code execution vulnerability in the ImportSQLTable endpoint. Despite using a getConnectionSafe method intended to establish secure connections, no restrictions are placed on JDBC connection settings, allowing attackers to arbitrarily set the JDBC URL.

An attacker can exploit this by posting a JSON document to the /99/ImportSQLTable endpoint with a connection_url property containing a malicious JDBC connection URL. This can trigger deserialization attacks via queryInterceptors or similar mechanisms in JDBC drivers such as MySQL, PostgreSQL, Derby, and H2O's own H2 driver.

Reported impact

The vulnerability enables remote code execution on the victim's server through deserialization of malicious objects, file reads, and command execution. An attacker with network access to the ImportSQLTable endpoint can achieve arbitrary command execution.

Index analysis

The vulnerability stems from unrestricted JDBC URL configuration in the getConnectionSafe method. The code fails to validate or restrict which JDBC drivers or URLs can be used, allowing attackers to point connections to malicious servers that trigger deserialization vulnerabilities inherent in various JDBC client libraries.

Classification

Organization
H2O.ai (subject)
Category
Security and cyberattacks
Industry
IT infrastructure and hosting
Harm status
Potential harm
Intent
Unintentional
Timing
Unknown
Harm types
Public interest
Failure modes
Unsafe autonomous behaviour
AI systems
H2O

Sources and evidence

This record was researched and written by the Index, based on the following original reporting.

gist.github.com
https://gist.github.com/AfterSnows/c24ca3c26dc89ab797e610e92a6a9acb
spear-shield.notion.site
https://spear-shield.notion.site/Unauthenticated-Remote-Code-Execution-via-Unrestricted-JDBC-Connection-87a958a4874044199cbb86422d1f6068