CVE-2026-58092: FreeBSD kernel credential primary group ID incorrect in mac_do transition

CVE-2026-58092 · Severity: high · CVSS 8.1 · Published 2026-08-26

FreeBSD 15.0 changed how user credentials are handled internally, but a function used by the mac_do permission framework was not properly updated. This bug allows certain unprivileged users to incorrectly set their primary group ID to "wheel" (group 0) when using specific mac_do rules, potentially enabling unauthorized privilege escalation on systems that use group 0 membership to grant elevated privileges.

Technologies: Freebsd. Vendors: Freebsd.

Quick answers

Is CVE-2026-58092 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-58092 being exploited in the wild.
How severe is CVE-2026-58092?
High severity, with a CVSS score of 8.1, published 26 August 2026.
Which products and versions are affected?
Freebsd 15.0.
Is there a fix for CVE-2026-58092?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-58092 attacked?
It is attacked with local access, in an operating system.
Am I affected by CVE-2026-58092?
Check whether you run Freebsd at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A logic error in the group_is_primary() function within FreeBSD 15.0's kernel credential subsystem causes it to read the primary group ID from the wrong location after a credential structure refactoring. When mac_do applies a transition rule (such as "uid=1001>uid=1002") that does not explicitly specify a target group, the function incorrectly retrieves the group ID from the first element of the supplementary group array instead of the dedicated primary group ID field. An attacker with a matching source UID can exploit this to set their primary group ID to 0 (wheel) if they have first removed themselves from all supplementary groups via setgroups(2). Depending on system configuration, membership in group 0 may grant root-equivalent privileges, enabling full privilege escalation. The vulnerability requires a matching mac_do rule and local system access.

Affected products

  • FreeBSD FreeBSD 15.0

Timeline

  • 2026-08-26: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.