Missing authorization in device and deployment group page events allows view-role members to change devices and deployment groups
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| nerves-hubnerves_hub_web |
≥ 7b511764a468bb2c1f33945874faa86af2255c0c, < 34ea112472a460319c1e1dec8ad0ffc37df05ffe→ 34ea112472a460319c1e1dec8ad0ffc37df05ffe |
34ea112472a460319c1e1dec8ad0ffc37df05ffe |
Original description The description as published by the source.
Summary
Missing Authorization vulnerability in the device and deployment group pages in nerves-hub nerves_hub_web allows an authenticated organization member with the view role to change devices and deployment groups via LiveView events reserved for the manage role. The event handlers that add and delete device certificates, add and remove tags, overwrite or clear a device's manual location, remove a device from its deployment group, move matched devices into a deployment group or remove unmatched ones, import devices from a CSV, and start, retry or delete firmware delta builds carry out the change without calling authorized!/2, and the pages render the controls to every member.
A view member can add a certificate that lets whoever holds its key connect as the device, delete a certificate so the device can no longer authenticate with it, and change which deployment group, and so which firmware release, a device receives. Everything stays within the organizations the member belongs to.
This issue affects nerves_hub: from 1.0.0 before 2.5.3.
Details
The dashboard reads the member's role into current_scope when a page mounts, and each privileged event handler is expected to call authorized!/2 with the permission it needs, all of which resolve to the manage role in lib/nerves_hub_web/helpers/authorization.ex. These handlers never do:
Device settings tab (NervesHubWeb.Components.DevicePage.SettingsTab): hooked_event/3 for delete-certificate, a…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- web github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com