Vulnerabilities in pkg:maven/org.apache.nifi/nifi-cdc-mysql-bundle

PACKAGE
Advisory Identifier: GHSA-r969-8v3h-23v9
Advisory Summary

CVE-2023-36542 is a HIGH (CVSS 8.8) apache nifi code injection vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Nifi cdc mysql bundle libraries in the Maven ecosystem. The issue involves apache nifi code injection vulnerability. Remediation is available by upgrading affected packages to version 1.23.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.nifi/nifi-cdc-mysql-bundle

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.nifi/nifi-cdc-mysql-bundle. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-r969-8v3h-23v9 CVE-2023-36542 HIGH Apache NiFi Code Injection vulnerability

CVE-2023-36542 at a Glance

CVE Identifier CVE-2023-36542
GHSA Identifier GHSA-r969-8v3h-23v9
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Nifi cdc mysql bundle
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-36542

To remediate this vulnerability, upgrade all affected Nifi cdc mysql bundle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.nifi:nifi-cdc-mysql-bundle fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-cdc-mysql-bundle</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-jms-processors fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-jms-processors</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-standard-processors fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-standard-processors</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-dbcp-service fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-dbcp-service</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-hikari-dbcp-service fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-hikari-dbcp-service</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-hadoop-dbcp-service fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-hadoop-dbcp-service</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-hbase_2-client-service fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-hbase_2-client-service</artifactId>
    <version>1.23.0</version>
</dependency>
org.apache.nifi:nifi-record-serialization-services fixed: 1.23.0
<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-record-serialization-services</artifactId>
    <version>1.23.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.nifi

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-36542, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.nifi

Analyze the terminal output to locate any version of Nifi cdc mysql bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.23.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.nifi command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Nifi cdc mysql bundle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Apache NiFi 0.0.2 through 1.22.0 include Processors and Controller Services that support HTTP URL references for retrieving drivers, which allows an authenticated and authorized user to configure a location that enables custom code execution. The resolution introduces a new Required Permission for referencing remote resources, restricting configuration of these components to privileged users. The permission prevents unprivileged users from configuring Processors and Controller Services annotated with the new Reference Remote Resources restriction. Upgrading to Apache NiFi 1.23.0 is the recommended mitigation.

CVE-2023-36542 Affected Nifi cdc mysql bundle Versions

8 component(s)
Fixed Versions:
1.23.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.nifi:nifi-cdc-mysql-bundle
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-jms-processors
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-standard-processors
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-dbcp-service
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-hikari-dbcp-service
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-hadoop-dbcp-service
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-hbase_2-client-service
Maven
≥ 0.0.2
< 1.23.0
1.23.0
org.apache.nifi:nifi-record-serialization-services
Maven
≥ 0.0.2
< 1.23.0
1.23.0

References

Frequently Asked Questions

What is CVE-2023-36542?
CVE-2023-36542 is a security vulnerability in Nifi cdc mysql bundle involving Apache NiFi Code Injection vulnerability under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Nifi cdc mysql bundle versions are affected?
Affected versions include releases prior to 1.23.0 across affected packages: org.apache.nifi:nifi-cdc-mysql-bundle, org.apache.nifi:nifi-jms-processors, org.apache.nifi:nifi-standard-processors, org.apache.nifi:nifi-dbcp-service, org.apache.nifi:nifi-hikari-dbcp-service, org.apache.nifi:nifi-hadoop-dbcp-service, org.apache.nifi:nifi-hbase_2-client-service, org.apache.nifi:nifi-record-serialization-services.
What version fixes CVE-2023-36542?
Upgrading to 1.23.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nifi-cdc-mysql-bundle affected?
Yes, org.apache.nifi:nifi-cdc-mysql-bundle is affected in releases prior to 1.23.0. Upgrade your dependency to 1.23.0 or later.
Is nifi-jms-processors affected?
Yes, org.apache.nifi:nifi-jms-processors is affected in releases prior to 1.23.0. Upgrade your dependency to 1.23.0 or later.
What is the CVSS score of CVE-2023-36542?
CVE-2023-36542 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-36542?
CVE-2023-36542 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2023-36542?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.nifi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r969-8v3h-23v9",
  "modified" : "2025-02-13T19:03:29Z",
  "published" : "2023-07-29T09:30:15Z",
  "aliases" : [ "CVE-2023-36542" ],
  "summary" : "Apache NiFi Code Injection vulnerability",
  "details" : "Apache NiFi 0.0.2 through 1.22.0 include Processors and Controller Services that support HTTP URL references for retrieving drivers, which allows an authenticated and authorized user to configure a location that enables custom code execution. The resolution introduces a new Required Permission for referencing remote resources, restricting configuration of these components to privileged users. The permission prevents unprivileged users from configuring Processors and Controller Services annotated with the new Reference Remote Resources restriction. Upgrading to Apache NiFi 1.23.0 is the recommended mitigation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-cdc-mysql-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-jms-processors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-standard-processors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-dbcp-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-hikari-dbcp-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-hadoop-dbcp-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-hbase_2-client-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.nifi:nifi-record-serialization-services"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.2"
      }, {
        "fixed" : "1.23.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36542"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/nifi/commit/532578799c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/nifi"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/NIFI-11744"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/swnly3dzhhq9zo3rofc8djq77stkhbof"
  }, {
    "type" : "WEB",
    "url" : "https://nifi.apache.org/security.html#CVE-2023-36542"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2023/Jul/43"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2023/07/29/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-31T22:03:10Z",
    "nvd_published_at" : "2023-07-29T08:15:48Z"
  }
}