CVE-2023-40037 Apache NiFi: Incomplete Validation of JDBC and JNDI Connection URLs

Medium 6.5 Published Updated

Authenticated users can bypass JDBC and JNDI connection URL validation in Apache NiFi using crafted inputs, potentially enabling unauthorized access or injection.

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-40037?

CVE-2023-40037 is a medium-severity vulnerability in Apache Nifi, published on 18 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Apache NiFi 1.21.0 through 1.23.0 support JDBC and JNDI JMS access in several Processors and Controller Services with connection URL validation that does not provide sufficient protection against crafted inputs. An authenticated and authorized user can bypass connection URL validation using custom input formatting. The resolution enhances connection URL validation and introduces validation for additional related properties. Upgrading to Apache NiFi 1.23.1 is the recommended mitigation.

Weakness: CWE-697, CWE-184

Which versions are affected by CVE-2023-40037?

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

PackageAffectedFixed in
org.apache.nifi:nifi-dbcp-base MavenFrom 1.21.01.23.1
org.apache.nifi:nifi-dbcp-base MavenFrom 1.21.01.23.1
nifi BitnamiFrom 1.21.01.23.1
org.apache.nifi:nifi-dbcp-service-api MavenFrom 1.21.01.23.1
org.apache.nifi:nifi-dbcp-service-api MavenFrom 1.21.01.23.1
org.apache.nifi:nifi-dbcp-service-bundle MavenFrom 1.21.01.23.1
3 more packages
org.apache.nifi:nifi-dbcp-service-bundle MavenFrom 1.21.01.23.1
org.apache.nifi:nifi-jms-processors MavenFrom 1.21.01.23.1
org.apache.nifi:nifi-jms-processors MavenFrom 1.21.01.23.1

Products include Apache Nifi.

How do I fix CVE-2023-40037?

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

Is CVE-2023-40037 being exploited?

There is no known exploitation of CVE-2023-40037 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Apache Nifi vulnerabilities

Sources

Also known as BIT-nifi-2023-40037, GHSA-23qf-3jf9-h3q9.

Is CVE-2023-40037 in your software?

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

Check your SBOMs for free