CVE-2023-34468 Apache NiFi: Potential Code Injection with Database Services using H2

High 8.8 Published Updated

Authenticated users can execute arbitrary code by configuring malicious H2 database URLs in Apache NiFi connection pools.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-34468?

CVE-2023-34468 is a high-severity code injection vulnerability in Apache Nifi, published on 12 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

The resolution validates the Database URL and rejects H2 JDBC locations.

You are recommended to upgrade to version 1.22.0 or later which fixes this issue.

Weakness: CWE-94

Which versions are affected by CVE-2023-34468?

7 open source packages ship an affected version, including org.apache.nifi:nifi-dbcp-base, nifi and org.apache.nifi:nifi-dbcp-service-nar. It affects 1 product.

PackageAffectedFixed in
org.apache.nifi:nifi-dbcp-base MavenFrom 0.0.21.22.0
org.apache.nifi:nifi-dbcp-base MavenFrom 0.0.21.22.0
nifi BitnamiFrom 0.0.21.22.0
org.apache.nifi:nifi-dbcp-service-nar MavenFrom 0.0.21.22.0
org.apache.nifi:nifi-dbcp-service-nar MavenFrom 0.0.21.22.0
org.apache.nifi:nifi-hikari-dbcp-service MavenFrom 0.0.21.22.0
1 more packages
org.apache.nifi:nifi-hikari-dbcp-service MavenFrom 0.0.21.22.0

Products include Apache Nifi.

How do I fix CVE-2023-34468?

Upgrade org.apache.nifi:nifi-dbcp-base to 1.22.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2023-34468 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-34468 exists.

Public exploit code: 1 Metasploit module and 7 proofs of concept on GitHub.

All Apache Nifi vulnerabilities

Sources

Also known as BIT-nifi-2023-34468, GHSA-xm2m-2q6h-22jw.

Is CVE-2023-34468 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free