# CVE-2025-64097: NervesHub has Insufficient Token Entropy that Allows Authentication Bypass via Brute Force

> Attackers can brute-force predictable API tokens to gain unauthorized access to user accounts and manage firmware updates.

- **Severity:** Critical 9.5 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 22 Jan 2026
- **Updated:** 22 Jan 2026
- **Also known as:** GHSA-m9vj-776q-vc8m

## What is CVE-2025-64097?

CVE-2025-64097 is a critical authentication bypass vulnerability in nerves-hub nerves_hub_web, published on 22 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

NervesHub is a web service that allows users to manage over-the-air (OTA) firmware updates of devices in the field. A vulnerability present starting in version 1.0.0 and prior to version 2.3.0 allowed attackers to brute-force user API tokens due to the predictable format of previously issued tokens. Tokens included user-identifiable components and were not cryptographically secure, making them susceptible to guessing or enumeration. The vulnerability could have allowed unauthorized access to user accounts or API actions protected by these tokens. A fix is available in version 2.3.0 of NervesHub. This version introduces strong, cryptographically-random tokens using `:crypto.strong_rand_bytes/1`, hashing of tokens before database storage to prevent misuse even if the database is compromised, and context-aware token storage to distinguish between session and API tokens. There are no practical workarounds for this issue other than upgrading. In sensitive environments, as a temporary mitigation,
firewalling access to the NervesHub server can help limit exposure until an upgrade is possible.

Weakness: CWE-330 (Use of Insufficiently Random Values)

## Which versions are affected by CVE-2025-64097?

It affects 1 product.


Products: Nerves-Hub Nerveshub.

## How do I fix CVE-2025-64097?

No fix has been published for CVE-2025-64097 yet. Limit exposure of the affected software until one is available.

## Is CVE-2025-64097 being exploited?

There is no known exploitation of CVE-2025-64097 in the wild and no public exploit code.

## Other vulnerabilities in nerves-hub nerves_hub_web

- [CVE-2026-28806](https://insights.sbomify.com/CVE-2026-28806/): Improper authorization in device bulk actions and device update API allows cross-organization device control (critical 9.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-64097 and fix it if it is affected.

What it is: CVE-2025-64097 is a critical authentication bypass vulnerability in nerves-hub nerves_hub_web, published on 22 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-64097 in the wild and no public exploit code.

Affected product: nerves-hub nerves_hub_web. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-64097/ (Markdown: https://insights.sbomify.com/CVE-2025-64097/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-64097
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-64097
- OSV: https://osv.dev/vulnerability/CVE-2025-64097

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-64097/
Summaries are generated and may contain mistakes; the official description above is the record.
