module

Apache NiFi H2 Connection String Remote Code Execution

Disclosed
Jun 12, 2023
Created
Aug 30, 2023

Description

The DBCPConnectionPool and HikariCPConnectionPool Controller Services in
Apache NiFi 0.0.2 through 1.21.0 allow an authenticated and authorized user
to configure a Database URL with the H2 driver that enables custom code execution.

This exploit will result in several shells (5-7).
Successfully tested against Apache nifi 1.17.0 through 1.21.0.

Authors

h00die
Matei "Mal" Badanoiu

Platform

Unix

Architectures

cmd

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/linux/http/apache_nifi_h2_rce
msf exploit(apache_nifi_h2_rce) > show targets
...targets...
msf exploit(apache_nifi_h2_rce) > set TARGET < target-id >
msf exploit(apache_nifi_h2_rce) > show options
...show and set options...
msf exploit(apache_nifi_h2_rce) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.