---
id: "CVE-2026-125275"
page: "https://infrastack.ai/live/CVE-2026-125275"
kind: "vulnerability"
aliases: ["CVE-2026-125275"]
title: "NervesHub: unregistered client certificate CA causes endless handshake loop"
severity: "high"
cvss: 8.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["elixir", "erlang-otp", "iot", "nerves-hub", "package", "self-hosted"]
not_affected_if: ["managed-hosting", "version-2.5.4-or-later"]
published_at: "2026-11-17T03:17:00+00:00"
first_seen_at: "2026-11-17T03:40:19+00:00"
updated_at: "2026-11-17T03:40:32+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125275", "first_seen_at": "2026-11-17T03:40:19+00:00"}]
exploit_sources: []
---

# NervesHub: unregistered client certificate CA causes endless handshake loop

Link for people: https://infrastack.ai/live/CVE-2026-125275 (this .md is for agents)

NervesHub's device endpoint can be sent a TLS client certificate whose issuing CA is not registered, which makes Erlang/OTP's SSL stack loop forever on certificate validation. Each looping handshake keeps a process querying the database until the node restarts, so an unauthenticated attacker can cause denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the nerves_hub version in `mix.lock` or `mix.exs` and see whether it is between `1.0.0` and `2.5.4`.
- Check whether `DEVICE_SSL_CACERTFILE` is set in the device endpoint's environment; if it is not, the endpoint trusts public CAStore roots.

## Fix

- nerves_hub: move to `2.5.4` or later

## Timeline

- 2026-11-17T03:40:19+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125275

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nerves-hub/nerves_hub_web/security/advisories/GHSA-8j48-4mg5-7v6v
- [fix] Patch: github.com https://github.com/nerves-hub/nerves_hub_web/commit/064e78cc189dd9b87748746f44179632a52ddf58
- [fix] Patch: github.com https://github.com/nerves-hub/nerves_hub_web/commit/a49fb8875f3aab40062881028ef4e406d985aaa9

## From the sources

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in device certificate verification in nerves-hub nerves_hub_web allows an unauthenticated remote attacker to cause a denial of service via a TLS client certificate whose CA is not registered. When a client certificate chains to a root in the device endpoint's trust store but no CA in the chain is registered in NervesHub, NervesHub.SSL.decide/2 refuses it with the reason :unknown_ca. Erlang/OTP ssl reads that reason as a missing trust anchor, looks for an alternative root, finds the same root and validates again without end. The handshake process queries the database on each pass and keeps running after the client disconnects, until the node restarts.

The device endpoint trusts the public roots from CAStore unless DEVICE_SSL_CACERTFILE is set, so a client certificate from a public CA whose chain allows client authentication is sufficient. A chain that ends at a root outside the trust store is refused once.

This issue affects nerves_hub: from 1.0.0 before 2.5.4.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
