nerves_hub_web authorization bypass in cross-organization device moves
nerves-hub nerves_hub_web
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
|
nerves-hub nerves_hub_web
| Product | Affected | Fixed in |
|---|---|---|
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
|
Incorrect Authorization vulnerability in the devices page bulk move in nerves-hub nerves_hub_web allows an authenticated user with the manage role in one organization and only the view role in another to move devices into the second organization's product via the "Move device(s) to product" action. The target-product event in NervesHubWeb.Live.Devices.Index looks the product up with NervesHub.Products.get_by_id/2, which checks that the user is a member of the product's organization at any role, and move-devices-product then changes each selected device's organization and product. The device API's move requires manage in the target organization, and an earlier fix added the check on the organization the devices leave but not on the one they enter.
A moved device keeps its key and certificate, joins the target organization's matching deployment groups, and is sent their firmware with a download URL, which the view role cannot otherwise obtain. The user cannot change or control devices that already belong to the other organization.
This issue affects nerves_hub: from 1.0.0 before 2.5.3.
From the CVE record · EEF
The devices page bulk move action has an authorization flaw. An authenticated user with manage access in one organization and only view access in another can move devices into the second organization’s product. Those devices may then join its deployment groups and receive firmware download URLs that the user could not otherwise obtain with view access.
Operators running nerves_hub versions 1.0.0 through versions before 2.5.3 should check their installations.