Rust Users Crate Privilege Escalation Vulnerability

Vulnerability

A privilege escalation vulnerability exists in the Rust 'users' crate, specifically in versions 0.8.0 and later. The issue arises from an incorrect group listing that appends the 'root' group to user and process group access lists, unless the total number of groups is exactly 1024. This flaw can be exploited if the group information is used for access control.

Impact

Exploitation of this vulnerability can lead to unauthorized privilege escalation by incorrectly granting access rights based on flawed group listings.

Reproduction

The vulnerability can be reproduced by using the 'group_access_list' function from the 'users' crate' version 0.8.0 or later. This function will incorrectly add the 'root' group to the access list, unless the group count is precisely 1024, thereby creating a false representation of group memberships that can be exploited for privilege escalation.

Remediation

Users can downgrade to versions prior to 0.8.0, which do not include the vulnerable functions, as a temporary workaround. Alternatively, the 'uzers' crate, an actively maintained fork of the 'users' crate, can be used.

Added: Jun 6, 2025, 4:41 PM
Updated: Jun 6, 2025, 4:41 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
4.6
remediation
0.0
relevance
0.2
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.