module

Apache NiFi H2 Connection String Remote Code Execution

Disclosed
2023-06-12
Created
2023-08-30

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
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.