Skip to main content

Zephyr WebSocket CVE-2026-93671

| EUVDEUVD-2026-126669 LOW
Out-of-bounds Read (CWE-125)
2026-11-16 zephyr
3.7
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker operates or MITMs a ws:// server
  2. Delivery
    Device initiates WebSocket handshake
  3. Exploit
    Server returns oversized wrong Sec-WebSocket-Accept header
  4. Execution
    Mismatch branch calls NET_DBG with unterminated slice
  5. Persist
    strlen scans past tmp_buf tail
  6. Impact
    Adjacent memory disclosed to log stream

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a specific non-default build condition: websocket debug logging must be compiled in (CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG=y, equivalently CONFIG_LOG_DEFAULT_LEVEL=4); in a default build (LOG_DEFAULT_LEVEL=3/INFO) the vulnerable NET_DBG() statement is absent and the flaw is not reachable. Given a debug build, the attacker must control or man-in-the-middle the WebSocket server endpoint the device connects to (a ws:// or otherwise attacker-terminated connection) and must craft a Sec-WebSocket-Accept response that both mismatches the expected accept key and is sized so the header value ends at the tail of the buffer the application passed as wreq->tmp_buf, so the strlen() over-read runs into adjacent memory. No application-level authentication is needed because the value is delivered during the handshake. Practical reward also depends on where the device's logs are collected or viewed, and the over-read may fault rather than disclose on targets where memory after the buffer is unmapped. Limiting factors: debug-only exposure, attacker must terminate/intercept the connection, and precise buffer-tail alignment (AC:H).

Impact

This is a low-priority issue that the signals consistently agree on, not a high-CVSS-but-low-real-risk mismatch. CVSS 3.1 is 3.7 (Low) with AV:N/AC:H/PR:N/UI:N/S:U and only C:L (confidentiality-limited, no integrity or availability impact in the vector). The vuln.today decision label is 'monitor', the weakest urgency tier, and there is no CISA KEV listing and no EPSS score supplied, so exploitation is neither confirmed nor probability-scored. No public exploit or PoC reference is present - only vendor patch commits and the GHSA advisory. The single most important risk-limiting fact is architectural, not statistical: the defective NET_DBG() statement is compiled out of a default build and exists only when websocket debug logging is explicitly enabled (CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG=y or CONFIG_LOG_DEFAULT_LEVEL=4), and the evidence confirms CONFIG_LOG_DEFAULT_LEVEL defaults to 3 (INFO) and the only in-tree references to the debug config are commented out. AC:H is justified because the peer must size its response so the header value lands at the tail of wreq->tmp_buf and relies on adjacent memory layout. PR:N is honest because the malicious/MITM server answers during the handshake before any application authentication. Net: a real-but-minor information-disclosure (or, on targets with unmapped adjacent memory, a connection/thread crash) confined to diagnostic builds - correctly triaged as monitor-and-patch-on-schedule, not an emergency.

Exploit ScenarioDerived

A victim Zephyr device running a debug-logging build calls websocket_connect() to a server the attacker controls or man-in-the-middles over ws://. The server completes the handshake with a deliberately wrong Sec-WebSocket-Accept value sized so its bytes end exactly at the tail of the caller's tmp_buf; the mismatch branch then passes the unterminated slice to a %s/strlen() in NET_DBG(), reading past the buffer and emitting adjacent memory into the device logs (or faulting if that memory is unmapped). No public exploit or PoC code is identified at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 16, 2026

An out-of-bounds read in the Zephyr WebSocket client's handshake handling can leak adjacent memory into the device log stream when a peer answers the WebSocket upgrade with a mismatched Sec-WebSocket-Accept value. The flaw lives in the NET_DBG() mismatch branch of on_header_value() in subsys/net/lib/websocket/websocket.c, which is compiled in only when WebSocket debug logging is enabled (CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG=y, or CONFIG_LOG_DEFAULT_LEVEL=4); default builds leave it out and are not reachable. Exposure is limited to Zephyr >= 2.1.0, < 4.3.2 and >= 4.4.0, < 4.5.0 built with that diagnostic configuration, where a malicious or man-in-the-middle ws:// server able to size the header value at the tail of wreq->tmp_buf can make the strlen() scan walk past the buffer, disclosing memory contents or, on targets where the following memory is unmapped, faulting the connection or thread; there is no out-of-bounds write and no integrity impact. No public exploit code was identified at time of analysis, the issue is not in CISA KEV, and the vendor fix (4.3.2 and 4.5.0) has been merged across release branches.

RemediationAI

Upgrade to Zephyr 4.3.2 or 4.5.0, which contain commit 221b72b32060e613ee5f2416b270073d7be79277 replacing the %s logging of the parser slice with a length-bounded copy; release lines that have not taken the backports remain affected per the advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-686p-f363-q695. Where an immediate upgrade is not possible, build with application WebSocket debug logging disabled - CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG=n and CONFIG_LOG_DEFAULT_LEVEL left at its default 3 (INFO) - which removes the vulnerable NET_DBG() statement entirely and closes the over-read; the trade-off is loss of WebSocket handshake/connection diagnostics on those devices. Note that the in-tree sample and test configurations (samples/net/sockets/websocket_client/prj.conf, tests/net/socket/websocket/prj.conf) have the debug-level setting commented out, so only locally customized diagnostic builds should be carrying it. Preventing attacker-terminated servers by using wss:// with certificate verification against the endpoint removes the man-in-the-middle trigger for the mismatch branch, but it does not fix the underlying over-read in debug builds.

Affected VersionsENISA

Zephyr 4.4.0 <4.5.0
Zephyr 2.1.0 <4.3.2

Affected Packages

euvd zephyr fix: 4.3.2, 4.5.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Zephyr's WebSocket client parses the HTTP upgrade response with the in-tree http_parser-based client, whose callbacks deliver each header field and value as a pointer/length slice pointing directly into the caller-supplied receive buffer. That buffer is set in websocket_connect() from wreq->tmp_buf (subsys/net/lib/websocket/websocket.c around lines 344-345), and http_client.c reads raw socket bytes into it and parses them in place with no NUL terminator appended. In on_header_value(), when the Sec-WebSocket-Accept value did not match the expected accept key, the raw slice pointer was passed as the second argument to a NET_DBG("[%p] Security keys do not match %s vs %s", ctx, str, at) call, so the logging formatter treated it as a C string and used strlen() to find a terminator, reading beyond the header value. This is CWE-125 (out-of-bounds read): the root cause is a length-carrying, non-terminated buffer being handed to a %s conversion instead of a length-bounded copy. The value arrives during the handshake, before any application-level authentication, so a peer that terminates the connection can trigger the mismatch branch at will by answering with a wrong accept key. The trigger surface is narrow in two ways: the defective statement is compiled in only when CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG is enabled (NET_WEBSOCKET_LOG_LEVEL defaults to CONFIG_LOG_DEFAULT_LEVEL, which defaults to 3/INFO in subsys/logging/Kconfig.filtering, so NET_DBG is compiled out by default), and disclosure further depends on the over-read reaching memory that is mapped and on where device logs are collected or displayed. The server-side HTTP/1 path (subsys/net/lib/http/http_server_http1.c) copies parser slices with explicit lengths and never uses %s on them, so it is unaffected. The upstream fix (commit 221b72b32060e613ee5f2416b270073d7be79277) introduces log_sec_accept_mismatch(), which memcpy's at most sizeof(got) - 1 bytes into a bounded stack buffer, NUL terminates it, and logs that copy, so the formatter never reads past the bytes the parser actually offered.

Know when Zephyr gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (zephyr) PRIMARY 3.7 LOW
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
vuln.today AI 3.7 LOW

Peer-supplied handshake value makes AV:N/PR:N/UI:N; AC:H because it needs a debug build plus response sizing to buffer tail and adjacent-memory layout; only limited log disclosure, so C:L/I:N/A:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

DescriptionCVE.org

The websocket client's HTTP header callback on_header_value() in subsys/net/lib/websocket/websocket.c receives the Sec-WebSocket-Accept header value as a pointer/length pair from the HTTP parser. The referenced bytes live inside the application-supplied receive buffer and are not NUL terminated. When the received value did not match the expected accept key, the pointer was passed directly to a %s conversion in a NET_DBG() call, so the logging code measured the string with strlen() and read on past the end of the header value looking for a terminator.

The value is supplied by the peer during the WebSocket handshake, before any application-level authentication, so a malicious or man-in-the-middle server reached over a ws:// (or otherwise attacker-terminated) connection can trigger the mismatch branch at will simply by answering with a wrong accept key. By sizing the response so the header value ends at the tail of the buffer passed to websocket_connect() as wreq->tmp_buf, the peer can make the scan run off the end of that buffer and into adjacent memory. The defective log statement is compiled in only when websocket debug logging is enabled (CONFIG_NET_WEBSOCKET_LOG_LEVEL_DBG=y, or CONFIG_LOG_DEFAULT_LEVEL=4); it is absent from a default build, which bounds exposure to diagnostic configurations.

The consequence is an out-of-bounds read whose contents are emitted to the log stream: memory adjacent to the receive buffer is disclosed wherever the device's logs are collected or displayed. On targets where the memory following the buffer is not mapped, the scan can instead fault and terminate the connection or thread. No out-of-bounds write occurs, so there is no integrity impact.

The fix copies at most sizeof(got) - 1 bytes of the parser-provided slice into a bounded stack buffer, NUL terminates the copy, and logs that instead, so the formatter never reads beyond the bytes the parser actually offered.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Medium
widely-used embedded RTOS, but websocket-client component narrower footprint
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

18
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +18
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2026-1678 CRITICAL POC
9.8 Mar 05

An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy