# GHSA-HMF2-MW8G-C8QG: Admin users can update stock items at restricted stock locations

- Database: GitHub
- Severity: CVSS 2.7 (Low)
- Published: 2026-11-05
- Modified: 2026-11-05

## Affected versions

- solidus\_admin (RubyGems): from 0.1.0, through 0.5.0

## Description

### Summary

A signed-in admin user with the role `Spree::PermissionSets::RestrictedStockManagement` for a subset of stock locations can update the `count_on_hand` and `backorderable` flag of stock items regardless of location by ID using the new admin.

### Details

`SolidusAdmin::ControllerHelpers::Authorization#authorize_solidus_admin_user!` authorizes `:admin` and the action against the `Spree::StockItem` class, rather than individual instances, so the permission set's `stock_location_id` condition isn't evaluated. There is no record-level authorization. `ResourcesController#set_resource` loads the record with `find(params[:id])` with no `authorize!`. `StockItemsController#update` saves the attributes and builds a stock movement. Note that `solidus_backend` is not affected.

### Proof of concept

A user with the `RestrictedStockManagement` role assigned to stock location A visits `/admin/stock_items/:id/edit` for a stock item at stock location B. They then update the quantity and backorderable values. This should cause a 403 status and reject the user, but it does not, allowing the operation. 

### Impact

Users are able to affect the integrity of the system by updating stock item's at stock locations they were deliberately excluded from.

### Workaround

If you are unable to upgrade to solidus_admin v0.5.1, put the following in an initializer:

```ruby
Rails.application.config.to_prepare do
  SolidusAdmin::StockItemsController.before_action(only: %i[edit update]) do
    authorize! action_name.to_sym, @stock_item
  end
end
```

### Credit

Ash Allen

## References

- https://github.com/solidusio/solidus/security/advisories/GHSA-hmf2-mw8g-c8qg

Page: https://cve.now/GHSA-HMF2-MW8G-C8QG

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
