Remote Code Execution (RCE) Affecting com.h2database:h2 Open this link in a new tab package, versions [,1.4.197)


0.0
high
  • Exploit Maturity

    Mature

  • Attack Complexity

    Low

  • Confidentiality

    High

  • Integrity

    High

  • Availability

    High

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id

    SNYK-JAVA-COMH2DATABASE-31685

  • published

    6 Jun 2018

  • disclosed

    11 Apr 2018

  • credit

    Caio Vargas, Matheus Bernardes, Nubank

How to fix?

Upgrade com.h2database:h2 to version 1.4.197 or higher.

Overview

com.h2database:h2 is a database engine

Affected versions of this package are vulnerable to Remote Code Execution (RCE). It provides a web console for managing the database, and by default it does not have a password set. The CREATE ALIAS function calls a java code, allowing an attacker to execute arbitrary java code on projects running the h2 database.

PoC

CREATE ALIAS REVERSE AS $$ String reverse(String s) { return new StringBuilder(s).reverse().toString(); } $$;
CALL REVERSE('Test');