CVE-2025-5791: Users Users May Append `root` To Vulnerability
HIGHCVE-2025-5791 is a HIGH (CVSS 7.1) users may append `root` to vulnerability (CWE-266: Incorrect Privilege Assignment) affecting Users libraries in the crates.io ecosystem. The issue involves users may append `root` to group listings. Remediation is available in the latest vendor maintenance releases.
CVE-2025-5791 at a Glance
Security Impact
CVSS: 7.1
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:U/C:H/I:H/A:N).
How to Fix CVE-2025-5791
To remediate this vulnerability, upgrade all affected Users dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade users to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for users
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-5791, inspect your project dependencies for Users:
inspect dependencies for users
Analyze the terminal output to locate any version of Users in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-266: Incorrect Privilege Assignment, where a product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor. In Users, 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-2025-5791 Affected Users Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
users
|
crates.io |
≥ 0.8.0
≤ 0.11.0
|
|
References
Frequently Asked Questions
What is CVE-2025-5791?
Which Users versions are affected?
What version fixes CVE-2025-5791?
Is users affected?
What is the CVSS score of CVE-2025-5791?
What CWE is associated with CVE-2025-5791?
How can I check crates.io dependencies for CVE-2025-5791?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m65q-v92h-cm7q",
"modified" : "2025-06-06T23:16:38Z",
"published" : "2025-06-05T01:17:28Z",
"aliases" : [ "CVE-2025-5791" ],
"summary" : "users may append `root` to group listings",
"details" : "Affected versions append `root` to group listings, unless the correct listing has exactly 1024 groups.\n\nThis affects both:\n\n- The supplementary groups of a user\n- The group access list of the current process\n\nIf the caller uses this information for access control, this may lead to privilege escalation.\n\nThis crate is not currently maintained, so a patched version is not available.\n\nVersions older than 0.8.0 do not contain the affected functions, so downgrading to them is a workaround.\n\n## Recommended alternatives\n- [`uzers`](https://crates.io/crates/uzers) (an actively maintained fork of the `users` crate)\n- [`sysinfo`](https://crates.io/crates/sysinfo)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "users"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.0"
}, {
"last_affected" : "0.11.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-5791"
}, {
"type" : "WEB",
"url" : "https://github.com/ogham/rust-users/issues/44"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2025-5791"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2370001"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ogham/rust-users"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2025-0040.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-266" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-05T01:17:28Z",
"nvd_published_at" : null
}
}