Sceawere

Vulnerability Detail

CVE-2026-58092UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

FreeBSD MAC Credential Transition Vulnerability

Vulnerability Metadata

Severity
Medium
Score / CVSS
5.4
Creation Date
14h ago
Vendor
FreeBSD
Product
FreeBSD
Attack Type
CWE-288: Authentication Bypass Using an Alternate Path or Channel
Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Attack Complexity
LOW

Narrative and Response

Description

In FreeBSD 15.0, the kernel structure used to represent user credentials changed: previously the primary group ID was stored in the first element of the array containing the list of supplementary group IDs, whereas now the primary group ID is stored in a dedicated field. This change was largely internal to the kernel and not user-visible. One function, group_is_primary(), was not properly updated as a part of this transition. This function is used by mac_do to determine the primary group ID of the credential after applying a transition rule, used when the rule target does not explicitly specify a group. As a result, with certain mac_do rules, it is possible for a credential switch to incorrectly set the primary group ID to the ID stored in the first element of the original credential's supplementary group array. If the list of supplementary groups is empty, this value will be 0, corresponding to the "wheel" group. For example, a rule such as "uid=1001>uid=1002" can be abused to set the primary group ID to 0 even if the process did not originally belong to group 0. Certain mac_do rules can be abused to set a process' group ID to 0. Note however, that the rule must apply to the caller in order for the bug to be triggered, e.g., given the ruleset "uid=1001>uid=1002", the user must have user ID 1001 in order to trigger the bug. Further, logged-in users will in general have a non-empty supplementary group list, in which case the bug can at worst be used to set the credential's first supplementary group ID as its primary group ID. Processes must explicitly remove themselves from all supplementary groups, using the privileged setgroups(2) system call, in order to exploit the bug to set 0 as the primary group ID. Since membership in group 0 is often used to enable controlled privilege escalation, the bug might be further exploitable to obtain root privileges, depending on the system configuration. For instance, a ruleset such as the following could be exploited by a process running as user 1001 and with an empty supplementary group list: "uid=1001>uid=1002;gid=0>uid=0".

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "5.4",
  "pubDate": "2026-08-26T05:18:12.453Z",
  "pubdate": "2026-08-26T05:18:12.453Z",
  "executiveSummary": "A flaw exists in the FreeBSD 15.0 kernel regarding the handling of user credentials during Mandatory Access Control (MAC) transitions. The vulnerability arises from an incomplete update to the group_is_primary() function following architectural changes to the kernel credential structure.\nThe primary impact of this vulnerability is the potential for unauthorized privilege escalation. By triggering a specific MAC transition rule, an attacker can manipulate the primary group ID of a process to an incorrect value, such as group 0 (the 'wheel' group).\nThis vulnerability affects FreeBSD 15.0 systems configured with specific mac_do rulesets. While the attack requires the user to satisfy an existing MAC transition rule—often necessitating that the process is already running under a specific UID—successful exploitation may grant the process membership in the 'wheel' group. This provides a direct pathway to root-level privilege escalation, depending on the system's security configuration and existing administrative access controls.\nThe attack is limited to local, authenticated users, as it requires the ability to execute processes and potentially manipulate supplementary group lists via the setgroups(2) system call.",
  "technicalDetails": "The root cause of this vulnerability is an implementation mismatch within the kernel credential management logic introduced in FreeBSD 15.0. Previously, the primary group ID was stored as the first element of the supplementary group array. Post-transition, the primary group ID occupies a dedicated field in the kernel credential structure. The function group_is_primary(), which is invoked by the mac_do module during credential switching, was not updated to reflect this schema change.\nThe vulnerable component is the kernel's MAC subsystem, specifically the group_is_primary() function, which incorrectly references the legacy location of the primary group ID when determining the credential state after a transition rule is applied. This failure occurs when a rule does not explicitly define a target group, causing the kernel to incorrectly resolve the primary group based on stale data structures.\nThe exploitation flow is as follows: 1) An attacker identifies a target process governed by a mac_do transition rule, such as 'uid=1001>uid=1002'. 2) To maximize the impact, the process must clear its supplementary group list using the setgroups(2) system call, which is a privileged operation. If the supplementary group list is empty, the first index of that array evaluates to 0. 3) The attacker triggers the mac_do transition. 4) The group_is_primary() function attempts to resolve the new primary group but reads the now-invalid index from the former supplementary array. 5) The process is incorrectly assigned the primary group ID 0 (wheel).\nBy gaining membership in the 'wheel' group, the process inherits associated administrative privileges. If further coupled with additional MAC rules such as 'gid=0>uid=0', an attacker can escalate to full root privileges. The requirement to clear supplementary groups via setgroups(2) implies that the process must already possess some degree of privilege or be configured in a way that allows the execution of this system call. The lack of network exposure is noted, as the vulnerability is strictly local, occurring entirely within the kernel's memory space and credential transition logic."
}
CVE-2026-58092: FreeBSD MAC Credential Transition Vulnerability (MEDIUM Severity, CVSS: 5.4) - Sceawere