Skip to main content
Vulnerability Database/CVE-2026-76787

CVE-2026-76787: UpdateHub Zephyr RTOS DOS Vulnerability

CVE-2026-76787 is a denial of service flaw in UpdateHub firmware-over-the-air client for Zephyr RTOS caused by null pointer dereference when parsing malformed CoAP responses. This post explains its impact, affected configurations, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-76787 Overview

CVE-2026-76787 is a null pointer dereference [CWE-476] in the Zephyr RTOS UpdateHub firmware-over-the-air client. The function z_impl_updatehub_probe() in subsys/mgmt/updatehub/updatehub.c parses CoAP probe responses using Zephyr's JSON library, which treats every descriptor field as optional. When a response omits the sha256sum field, the code reaches strlen(...objects.sha256sum) + 1 with a NULL pointer and faults. By default, the client uses plain CoAP over UDP on port 5683 with no peer authentication, allowing an on-path attacker or DNS spoofer to deliver malformed metadata.

Critical Impact

A remote attacker can trigger a repeatable denial of service on Zephyr devices polling UpdateHub, halting the system on every poll interval.

Affected Products

  • Zephyr RTOS UpdateHub subsystem (subsys/mgmt/updatehub/updatehub.c)
  • Deployments with CONFIG_UPDATEHUB_DTLS unset (default configuration)
  • Targets with protected low-address ranges, including MMU-based architectures, builds using CONFIG_NULL_POINTER_EXCEPTION_DETECTION_DWT/_MPU/_PMP, TrustZone non-secure images, and SoCs such as nRF54L

Discovery Timeline

  • 2026-10-19 - CVE-2026-76787 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-76787

Vulnerability Analysis

The UpdateHub client parses CoAP probe responses with json_obj_parse(), which returns a bitmask of successfully decoded fields rather than failing on missing ones. A response omitting sha256sum leaves the corresponding const char * NULL inside the zero-initialised struct resp_probe_any_boards or struct resp_probe_some_boards.

Both metadata branches then compute sha256size = strlen(...objects.sha256sum) + 1 before validation. The subsequent SHA256_HEX_DIGEST_SIZE check runs on a value derived from the faulting read and cannot prevent it. A probe response as simple as "objects":[[{}],[{}]] is sufficient to trigger the condition.

Impact is availability only. There is no memory write, and copied bytes are only compared against the locally computed image hash, so no information-disclosure channel exists. On classic Cortex-M targets with the vector table readable at address zero, the walk typically terminates and the length check rejects the request, making the outcome configuration- and SoC-dependent.

Root Cause

The Zephyr JSON decoder treats optional descriptor fields as absent-is-success. The UpdateHub metadata handler assumes sha256sum is always present and dereferences it with strlen() before any NULL check. Combined with zero-initialised response structs, this produces a direct read at address zero when the server omits the field.

Attack Vector

The metadata originates entirely from the network peer. probe_cb() accepts the datagram, invokes coap_packet_parse(), and copies the payload with no token matching and no cryptographic check. With CONFIG_UPDATEHUB_DTLS unset, start_coap_client() uses unauthenticated UDP on port 5683 and resolves the server via unauthenticated DNS.

An on-path attacker, a DNS spoofer, or an off-path attacker who wins the race with a forged source address can deliver the malformed response. No user interaction is required because updatehub_autohandler() polls on CONFIG_UPDATEHUB_POLL_INTERVAL. When CONFIG_UPDATEHUB_DTLS=y, the trigger narrows to a malicious or compromised update server.

c
// Security patch from upstream commit 6fc4f27a
			goto cleanup;
		}

+		if (metadata_any_boards.objects[1].objects[0].objects.sha256sum == NULL) {
+			LOG_ERR("SHA256 is missing from the metadata");
+			ctx.code_status = UPDATEHUB_METADATA_ERROR;
+			goto cleanup;
+		}
+
		sha256size = strlen(
			metadata_any_boards.objects[1].objects[0].objects.sha256sum) + 1;
// Source: https://github.com/zephyrproject-rtos/zephyr/commit/6fc4f27a74021b52c509e4f7912d68145dfa7728

The fix adds an explicit sha256sum == NULL check that returns UPDATEHUB_METADATA_ERROR ahead of the strlen() call in both metadata branches.

Detection Methods for CVE-2026-76787

Indicators of Compromise

  • Device fatal fault logs referencing a load at address 0x0 immediately after an UpdateHub poll cycle
  • Repeated system halts or reboots aligned with CONFIG_UPDATEHUB_POLL_INTERVAL
  • Inbound CoAP responses on UDP port 5683 containing minimal payloads such as "objects":[[{}],[{}]]
  • Unexpected DNS responses resolving the configured UpdateHub server to attacker-controlled addresses

Detection Strategies

  • Inspect CoAP traffic on UDP port 5683 for probe responses missing the sha256sum descriptor field
  • Correlate device crash telemetry with the preceding UpdateHub poll timestamp to identify remotely triggered faults
  • Flag DNS responses for UpdateHub endpoints that deviate from established baselines

Monitoring Recommendations

  • Enable CONFIG_UPDATEHUB_LOG_LEVEL at a level that surfaces metadata errors in device logs forwarded to central logging
  • Monitor fleet-wide crash and reboot rates for correlated spikes that would indicate a targeted denial-of-service campaign
  • Collect CoAP flow metadata from gateways to identify unauthenticated UDP sessions on port 5683 originating from unexpected peers

How to Mitigate CVE-2026-76787

Immediate Actions Required

  • Apply the upstream Zephyr patch adding the sha256sum == NULL check in z_impl_updatehub_probe()
  • Enable CONFIG_UPDATEHUB_DTLS=y to restrict the attack surface to compromised or malicious update servers
  • Restrict outbound CoAP traffic to known UpdateHub server addresses via network ACLs

Patch Information

The fix is available in Zephyr commit 6fc4f27a and documented in GitHub Security Advisory GHSA-82gq-cmqw-xgx2. The patch adds an explicit NULL check for sha256sum and returns UPDATEHUB_METADATA_ERROR before any strlen() call in both metadata branches.

Workarounds

  • Disable UpdateHub polling by unsetting CONFIG_UPDATEHUB_AUTOMATIC until the patch is deployed
  • Deploy devices behind a trusted gateway that validates CoAP responses and filters malformed payloads
  • Pin UpdateHub server resolution via static host entries to reduce exposure to DNS spoofing
bash
# Harden UpdateHub configuration in prj.conf
CONFIG_UPDATEHUB=y
CONFIG_UPDATEHUB_DTLS=y
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU=y
# Increase poll interval to reduce DoS re-trigger frequency during remediation
CONFIG_UPDATEHUB_POLL_INTERVAL=1440

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.