Description
The optional ShellUserGroupProvider in Apache NiFi 1.10.0 to 1.16.2 and Apache NiFi Registry 0.6.0 to 1.16.2 does not neutralize arguments for group resolution commands, allowing injection of operating system commands on Linux and macOS platforms. The ShellUserGroupProvider is not included in the default configuration. Command injection requires ShellUserGroupProvider to be one of the enabled User Group Providers in the Authorizers configuration. Command injection also requires an authenticated user with elevated privileges. Apache NiFi requires an authenticated user with authorization to modify access policies in order to execute the command. Apache NiFi Registry requires an authenticated user with authorization to read user groups in order to execute the command. The resolution removes command formatting based on user-provided arguments.
Remediation
References
https://nifi.apache.org/security.html#CVE-2022-33140
https://lists.apache.org/thread/bzs2pcdjsdrh5039oslmfr9mbs9qqdhr
Related Vulnerabilities
CVE-2017-12645 Vulnerability in maven package com.liferay.portal:com.liferay.portal.impl
CVE-2023-40339 Vulnerability in maven package org.jenkins-ci.plugins:config-file-provider
CVE-2023-29514 Vulnerability in maven package org.xwiki.platform:xwiki-platform-administration-ui
CVE-2019-13416 Vulnerability in maven package com.floragunn:search-guard-6
CVE-2019-1003064 Vulnerability in maven package org.jenkins-ci.plugins:aws-device-farm