Skip to content

v2.5.3

Choose a tag to compare

@joshk joshk released this 10 Nov 10:31
· 126 commits to main since this release
c721fb3

A security release. It fixes six vulnerabilities, published as advisories (one critical, three high, one medium and one low), and several smaller holes found while fixing them. Every instance should upgrade. Read Upgrading first: Google sign-in can stop creating accounts, a migration takes devices off other products' deployment groups, and the device API now ignores fields it used to save.

Upgrading

  • Check how your instance lets people sign up. SIGN_UP_METHODS replaces OPEN_FOR_REGISTRATIONS and takes password, google or none. OPEN_FOR_REGISTRATIONS=true still opens both the sign-up form and Google sign-in. With GOOGLE_CLIENT_ID set and neither variable set, Google sign-in now creates accounts only for people with a pending invite, and the node warns about it when it starts. Set SIGN_UP_METHODS=google to let anyone with a Google account sign up, or SIGN_UP_METHODS=none to keep sign-up to invites and stop the warning. An unknown value stops the node from starting. (GHSA-r92p-gg92-gmwm)
  • A migration takes devices off other products' deployment groups. Such a device was being sent that product's firmware, which could be another org's. The migration logs each device it takes off, with the group it was in. It also logs each device whose org doesn't own its product, and changes nothing about them. From 2.5.3 those devices are refused when they connect. To let one connect again, set its product_id to a product of its own org, or delete it. The advisory has queries to find both kinds before upgrading. (GHSA-rpp7-x9hm-jrmr)
  • The device API saves only what a user may set on a device. Creating or updating a device saves identifier (on create), description, tags, update_mode, connecting_code and managed_updates_allowed, and ignores any other field. It used to save whatever the request held, including org_id, product_id and deployment_id. A device still joins a matching deployment group when it connects. (GHSA-rpp7-x9hm-jrmr, #3260)
  • Devices that ask for very expensive shared secret keys are refused. A device that authenticates with a shared secret may ask for at most 10,000 PBKDF2 iterations and a 64 byte key. NervesHubLink, nerves-hub-link-agent and nerves-hub-link-esp32 send 1,000 and 32, and only NervesHubLink lets an app change them. A refused device is logged as :key_derivation_out_of_range. (#3256)
  • Reload pages with a console open after a rolling deploy. The device console and local shell now connect with the session cookie instead of a token in the page. While nodes run both versions, one whose page came from a node on the other version can't connect until the page is reloaded. (GHSA-c7jf-qcx9-xxf8)

Security

Each advisory says how to check whether your instance was affected, and what upgrading doesn't undo.

  • Critical: CLI sign-in links gave an API token to whoever sent them. Starting a CLI sign-in needs no account, so anyone could start one, send its link to a NervesHub user, and receive an API token for that user's account once they clicked Confirm. A CLI sign-in can now only be found by typing in its code. Affects 2.5.0 to 2.5.2. (GHSA-9vr9-463q-46qp, CVE-2026-119446)
  • High: Google sign-in, and the link in a confirmation email, signed people in to an account someone else had registered with their address, and that person could keep signing in with its password. Google sign-in also created accounts when registrations were closed and didn't check that Google had verified the address, and the API's password sign-in gave API tokens to accounts whose email wasn't confirmed. Affects 2.3.0 to 2.5.2. (GHSA-r92p-gg92-gmwm, CVE-2026-120999)
  • High: A user who could manage devices in any org, and anyone with an account can create one, could write into another org through IDs in API requests and web UI forms. They could put a device on the other org's deployment group and be sent its firmware, move devices into its product, and add signing keys, products or provisioned devices to it. Affects 1.0.0 to 2.5.2. (GHSA-rpp7-x9hm-jrmr, CVE-2026-120730)
  • High: The devices page's bulk move let a user move devices into an org where they had only the view role. The devices joined that org's deployment groups and were sent its firmware. The move now needs manage in that org. Affects 1.0.0 to 2.5.2. (GHSA-2j7r-q3vm-8j34, CVE-2026-120295)
  • Medium: Members with the view role could upload or delete device certificates, change a device's tags and location, add devices to a deployment group or take them off one, and start or delete firmware delta builds, from controls the web UI showed them. Uploading a certificate let them connect as the device. They could also read local shell output in Data History, which now records it by size only. Affects 1.0.0 to 2.5.2. (GHSA-gxj7-m8x6-r644, CVE-2026-120286)
  • Low: Removing a member, or lowering their role, didn't affect the pages, consoles, local shells and device event streams they already had open, and the token the console connected with was valid for 24 hours, signed out or not. Affects 2.0.0 to 2.5.2. (GHSA-c7jf-qcx9-xxf8, CVE-2026-120997)
  • A connected device could join another device's topic and receive its firmware update URLs, support scripts and local shell input. A device can now only join its own. (#3254)
  • A device could ask for any number of PBKDF2 iterations and any key length when authenticating with a shared secret, and hold a CPU for minutes with one request, with or without the secret (#3256)
  • The account details form changed the password when a request carried one, without asking for the current password (#3257)
  • The redirect after signing in could be sent to another site by a URL that a browser reads differently from the server's allow-list check, such as one with a backslash or credentials in it (#3257)
  • Tokens in request paths are recorded as [FILTERED] in the request log and in traces. These include the token the CLI polls its sign-in with, which collects the API token once someone confirms, and the links in password reset, invite and confirmation emails. (#3259)

Changed

  • Downloading firmware needs the manage role in the web UI, as it already did in the API, since firmware images can carry secrets. view members no longer see the Download button. Creating or deleting a product through the API needs manage rather than admin, and managing certificate authorities in the web UI needs manage rather than admin, as each already did in the other. (#3258)
  • A CLI sign-in's URL is /auth/cli, where you type in the code the CLI shows. Before you confirm, the page shows when the sign-in started, the address it came from and the description the CLI sent. Clients need no change, though nh 0.1.x still tells you to check that the code matches the browser's. Each address can start ten CLI sign-ins, and each user can try ten codes, every ten minutes on each web node. (GHSA-9vr9-463q-46qp)
  • A new email address on the account page takes effect when you follow the link sent to it, not straight away (GHSA-r92p-gg92-gmwm)
  • Following a confirmation link confirms the address, and no longer signs you in unless you're already signed in to that account (GHSA-r92p-gg92-gmwm)
  • Google sign-in accepts only an address Google has verified. It signs in to an existing account with that address only after the account's owner links the two, by signing in with the account's password, or resetting it, after the Google attempt. (GHSA-r92p-gg92-gmwm)
  • The API's password sign-in refuses an account whose email isn't confirmed, as the web sign-in does. A password reset confirms the account. (GHSA-r92p-gg92-gmwm)
  • Registering from the link in an invite email creates the account already confirmed. Registering from the link the members page shows, or from an invite emailed before 2.5.3, leaves it unconfirmed and emails a confirmation link. (GHSA-r92p-gg92-gmwm)
  • Signing out closes the device consoles and local shells open in that session (GHSA-c7jf-qcx9-xxf8)
  • Changing managed_updates_allowed through the device API writes an audit entry, as the device page's toggle does, and a value that isn't a boolean gets a 422. Device responses include it. (#3260)

Fixed

  • Moving a device through the API to an org that doesn't exist returned a 500. It now gets the same 401 as an org you can't manage, so the answer doesn't show whether the name is taken. (#3255)
  • The device API's create and update read a device's fields from the device object, as the API docs show. Sent that way, a create was refused for having no identifier and an update saved nothing. Fields at the top level still work. The docs no longer list deployment_group_id and updates_enabled, which were never saved. (#3260)
  • Setting a device to automatic through the API clears its update attempts and has its deployment group consider it straight away, as the web UI's update mode buttons do, and the audit entry names the mode. Before, the device waited for its next reconnect. A null mode now gets a 422. (#3261)