Vulnerabilities in pkg:maven/org.apache.nifi/nifi-single-user-utils
PACKAGECVE-2022-26850 is a MODERATE (CVSS 6.5) nifi-single-user-utils vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Nifi single user utils libraries in the Maven ecosystem. The issue involves nifi-single-user-utils. Remediation is available by upgrading affected packages to version 1.16.
pkg:maven/org.apache.nifi/nifi-single-user-utils
Vulnerability advisories affecting package pkg:maven/org.apache.nifi/nifi-single-user-utils. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-rvp4-r3g6-8hxq | CVE-2022-26850 | MODERATE | Insufficiently Protected Credentials via Insecure Temporary File in org.apache.nifi:nifi-single-user-utils |
CVE-2022-26850 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2022-26850
To remediate this vulnerability, upgrade all affected Nifi single user utils dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-single-user-utils</artifactId>
<version>1.16</version>
</dependency>
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-2022-26850, 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 single user utils in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16), 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-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Nifi single user utils, 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
CVE-2022-26850 Affected Nifi single user utils Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.nifi:nifi-single-user-utils
|
Maven |
< 1.16
|
1.16
|
References
Frequently Asked Questions
What is CVE-2022-26850?
Which Nifi single user utils versions are affected?
What version fixes CVE-2022-26850?
Is nifi-single-user-utils affected?
What is the CVSS score of CVE-2022-26850?
What CWE is associated with CVE-2022-26850?
How can I check Maven dependencies for CVE-2022-26850?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rvp4-r3g6-8hxq",
"modified" : "2023-08-08T20:30:32Z",
"published" : "2022-06-20T22:33:41Z",
"aliases" : [ "CVE-2022-26850" ],
"summary" : "Insufficiently Protected Credentials via Insecure Temporary File in org.apache.nifi:nifi-single-user-utils",
"details" : "### Impact\n\n`org.apache.nifi.authentication.single.user.writer.StandardLoginCredentialsWriter` contains a local information disclosure vulnerability due to writing credentials (username and password) to a file that is readable by all other users on unix-like systems. On unix-like systems, the system's temporary directory is shared between all users on that system. As such, files written to that directory without setting the correct file permissions can allow other users on that system to view the contents of the files written to those temporary files.\n\n### Source\n\nAn insecure temporary file is created here:\n - https://github.com/apache/nifi/blob/6a1c7c72d5b91b9ce5d5cb5b86e3155d21e2c19b/nifi-commons/nifi-single-user-utils/src/main/java/org/apache/nifi/authentication/single/user/writer/StandardLoginCredentialsWriter.java#L75\n\nThe username and password credentials are written to this file here:\n - https://github.com/apache/nifi/blob/6a1c7c72d5b91b9ce5d5cb5b86e3155d21e2c19b/nifi-commons/nifi-single-user-utils/src/main/java/org/apache/nifi/authentication/single/user/writer/StandardLoginCredentialsWriter.java#L85-L95\n\n### Patches\n\nThe vulnerability has been patched in version `1.16`.\n\n### Prerequisites\n\nThis vulnerability impacts Unix-like systems, and very old versions of Mac OSX and Windows as they all share the system temporary directory between all users.\n\n### Workarounds\n\nSetting the `java.io.tmpdir` system environment variable to a directory that is exclusively owned by the executing user will fix this vulnerability for all operating systems.\n\n### References\n\n - https://issues.apache.org/jira/browse/NIFI-9785\n - https://github.com/apache/nifi/commit/859d5fe\n - https://github.com/apache/nifi/pull/5856\n - https://nifi.apache.org/security.html#CVE-2022-26850\n - https://twitter.com/JLLeitschuh/status/1511736635645435904?s=20&t=I3w3zF6Y2DUvWYsEFqERjg",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.nifi:nifi-single-user-utils"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.16"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.15.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-rvp4-r3g6-8hxq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-26850"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/nifi/commit/859d5fe"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/nifi/commit/859d5fe8cfe05ad24600b021f0ebf15753a8105c"
}, {
"type" : "WEB",
"url" : "https://nifi.apache.org/security.html#CVE-2022-26850"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2022/04/06/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-522" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-20T22:33:41Z",
"nvd_published_at" : "2022-04-06T18:15:00Z"
}
}