nerves_hub_web cross-organization writes via submitted object IDs
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 |
| No fix yet |
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 |
| No fix yet |
Improperly Controlled Modification of Dynamically-Determined Object Attributes vulnerability in the device API, device forms, signing key and product forms and JITP settings in nerves-hub nerves_hub_web allows an authenticated user who manages devices in any organization to write into other organizations via submitted org_id, product_id and deployment_id fields. The device API create and update actions and the dashboard device forms pass the request parameters to NervesHub.Devices.Device.changeset/2, which casts the organization, product, deployment group and update state as given. The signing key and product forms merge the session's organization into the submitted parameters so that a submitted org_id wins, and the JITP changeset accepts any product_id. Each request requires the manage role only in the user's own organization, and any account can create one.
A device placed on another organization's deployment group, or moved into its product, is sent that organization's firmware with a download URL. The user cannot change or control devices that already belong to the other organization, and cannot upload firmware to it.
This issue affects nerves_hub: from 1.0.0 before 2.5.3.
From the CVE record · EEF
In affected nerves_hub versions, the device API, dashboard forms, and JITP settings accept submitted organization or product identifiers that can target another organization. An authenticated user with the manage role in their own organization can write into another organization; any account can create an organization where it has that role. A device placed in another organization's deployment group can receive that organization's firmware download URL, but the user cannot control devices already belonging to that organization or upload firmware to it.
Operators running nerves_hub versions 1.0.0 through versions before 2.5.3 should check their deployments.