Miggo Logo

GHSA-jq8x-v7jw-v675: Duplicate Advisory: users may append `root` to group listings

7.1

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
6/6/2025
Updated
6/6/2025
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
usersrust>= 0.8.0, <= 0.11.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability lies in the way the users crate, specifically within its Unix-like OS implementation, determines the group access list for a process. The function group_access_list (or a similar function responsible for this task, often found in src/base.rs or src/os/unix.rs in such crates) pre-allocates a buffer of 1024 gid_t elements, initializing them to 0 (which is the group ID for root). It then calls the libc::getgroups C function to fill this buffer with the actual supplementary group IDs of the process. The critical flaw occurs if the process belongs to fewer than 1024 groups. In this scenario, libc::getgroups writes the actual group IDs to the beginning of the buffer but leaves the remaining elements as 0. The Rust code then iterates over the entire 1024-element buffer, not just the portion filled by getgroups. This results in the root group (GID 0) being incorrectly added to the list of groups for the process if any of the trailing, un-overwritten buffer elements are processed. Although a deduplication step exists, it only removes consecutive duplicates, so if legitimate groups intersperse the erroneous root entries, root might still appear in the final list. This could lead to privilege escalation if software relies on this list for authorization decisions, mistakenly granting root privileges.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### *upli**t* **visory T*is **visory **s ***n wit**r*wn ****us* it is * *upli**t* o* **S*-m**q-v***-*m*q. T*is link is m*int*in** to pr*s*rv* *xt*rn*l r***r*n**s. ### Ori*in*l **s*ription * *l*w w*s *oun* in t** us*r's *r*t* *or Rust. T*is vuln*r**i

Reasoning

T** vuln*r**ility li*s in t** w*y t** `us*rs` *r*t*, sp**i*i**lly wit*in its Unix-lik* OS impl*m*nt*tion, **t*rmin*s t** *roup ****ss list *or * pro**ss. T** *un*tion `*roup_****ss_list` (or * simil*r *un*tion r*sponsi*l* *or t*is t*sk, o*t*n *oun* i
GHSA-jq8x-v7jw-v675: Rust users Group PrivEsc Flaw | Miggo