VYPR
High severityNVD Advisory· Published Jun 14, 2024· Updated Aug 1, 2024

Broken Function Level Authorization (BFLA) in snipe/snipe-it

CVE-2024-5685

Description

Users with "User:edit" and "Self:api" permissions can promote or demote themselves or other users by performing changes to the group's memberships via API call.This issue affects snipe-it: from v4.6.17 through v6.4.1.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Users with 'User:edit' and 'Self:api' permissions can escalate privileges by modifying group memberships via API in Snipe-IT.

Root

Cause

The vulnerability stems from insufficient authorization checks in the user update API endpoint. Users possessing both "User:edit" and "Self:api" permissions were able to modify group memberships of any user, including themselves, without requiring superuser status. The code that handled group syncing did not properly gate the operation behind a superuser check, allowing non-superusers to alter group associations via API calls [1].

Exploitation

An attacker with the requisite permissions can send a crafted API request to the user update endpoint, including a groups parameter. The application would then change the target user's group memberships, even if the attacker is not a superuser. No additional authentication bypass is needed; the vulnerability is exercised through normal API usage for users who have been granted these permissions [1][3].

Impact

By promoting themselves or others to groups with elevated privileges, an attacker can achieve privilege escalation. For example, adding a user to a group with superuser rights effectively grants full administrative control over the Snipe-IT instance, leading to complete compromise of the application and its data [1].

Mitigation

The issue is fixed in Snipe-IT version 6.4.2. The fix refactors the group syncing logic to ensure that only superusers can modify group memberships via the API [3][4]. Users running versions from 4.6.17 through 6.4.1 should upgrade to 6.4.2 or later to remediate the vulnerability.

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
snipe/snipe-itPackagist
< 6.4.26.4.2

Affected products

2

Patches

1
34f1ea1c0ecd

Re-order gating and refactor group syncing

https://github.com/snipe/snipe-itsnipeMay 21, 2024via ghsa
1 file changed · +7 19
  • app/Http/Controllers/Api/UsersController.php+7 19 modified
    @@ -475,7 +475,7 @@ public function update(SaveUserRequest $request, $id)
             if ($request->has('permissions')) {
                 $permissions_array = $request->input('permissions');
     
    -            // Strip out the superuser permission if the API user isn't a superadmin
    +            // Strip out the individual superuser permission if the API user isn't a superadmin
                 if (! Auth::user()->isSuperUser()) {
                     unset($permissions_array['superuser']);
                 }
    @@ -493,32 +493,20 @@ public function update(SaveUserRequest $request, $id)
               
             if ($user->save()) {
     
    -            // Check if the request has groups passed and has a value
    -            if ($request->filled('groups')) {
    +            // Check if the request has groups passed and has a value, AND that the user us a superuser
    +            if (($request->has('groups')) && (Auth::user()->isSuperUser())) {
     
                     $validator = Validator::make($request->all(), [
                         'groups.*' => 'integer|exists:permission_groups,id',
                     ]);
    -                
    -                if ($validator->fails()){
    -                    return response()->json(Helper::formatStandardApiResponse('error', null, $user->getErrors()));
    -                }
     
    -                // Only save groups if the user is a superuser
    -                if (Auth::user()->isSuperUser()) {
    -                    $user->groups()->sync($request->input('groups'));
    -                }
    +                $user->groups()->sync($request->input('groups'));
     
    -            // The groups field has been passed but it is null, so we should blank it out
    -            } elseif ($request->has('groups')) {
    -                
    -                // Only save groups if the user is a superuser
    -                if (Auth::user()->isSuperUser()) {
    -                    $user->groups()->sync($request->input('groups'));
    +                if ($validator->fails()) {
    +                    return response()->json(Helper::formatStandardApiResponse('error', null, $user->getErrors()));
                     }
    -            }
    -
     
    +            }
                 return response()->json(Helper::formatStandardApiResponse('success', (new UsersTransformer)->transformUser($user), trans('admin/users/message.success.update')));
             }
     
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.