Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach nanomsg WebSocket listener
-
DeliverySend handshake with oversized Sec-WebSocket-Version header
-
ExploitUnbounded sprintf overflows response buffer
-
ExecutionCorrupt adjacent heap memory
-
ImpactCrash service or execute code
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires that the target application enable nanomsg's WebSocket (ws) transport and expose a listening socket reachable by the attacker; the overflow is triggered purely by the attacker-controlled Sec-WebSocket-Version header during the pre-authentication handshake, so no credentials or user interaction are needed against a default WS listener. Limiting factors: nanomsg must actually be compiled/deployed with the WS transport in use (TCP/IPC-only deployments are unaffected), the version must be 0.5-beta through 1.x below 1.2.3, and reliable code execution (as opposed to a crash) depends on heap layout and platform, which is not demonstrated by any provided POC. |
| Impact | This is a genuinely serious flaw. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) plus CWE-122 heap overflow and confirmed source evidence (PR #1130 replacing an unbounded sprintf with snprintf) point to a remotely triggerable memory-corruption bug reachable during the WebSocket handshake, before any application-level authentication in nanomsg's WS transport. I question the vendor's PR:L: the overflow occurs in nn_ws_handshake_server_reply while reflecting a client-supplied header, so it is reachable by any peer that can open a WS connection - effectively PR:N - which raises real-world risk above the score's implication. Countervailing signals lower priority: no EPSS score is provided, there is NO CISA KEV listing, and NO public exploit was identified - the referenced GitHub artifact is the fix PR, not a weaponized POC. I also disagree with the vendor's SC:H/SI:H/SA:H subsequent-system (scope-change) ratings, which appear to inflate the score; a stack/heap corruption within the process does not clearly cross a security boundary to another component. Net: treat as high-priority patching for any exposed nanomsg WebSocket listener, but note exploitation is currently theoretical (no observed in-the-wild activity) and achieving reliable code execution from a heap overflow requires target-specific work. |
| Exploit ScenarioDerived | An attacker who can reach a nanomsg service using the WebSocket (ws://) transport opens a connection and sends an HTTP handshake containing an oversized Sec-WebSocket-Version header; the server copies that value into a fixed-size response buffer via unbounded sprintf, overflowing the heap. This corrupts adjacent memory to crash the service (DoS) or, with careful crafting, steer execution toward code execution. No public exploit code was identified, and the low attack complexity (AC:L) means no special timing or race is needed once a WS listener is exposed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 24, 2026
Heap-based buffer overflow in the Nanomsg WebSocket transport (versions 0.5-beta through 1.x before 1.2.3) allows remote attackers to corrupt heap memory by sending an oversized Sec-WebSocket-Version header during the WebSocket handshake, which is processed before any authentication or user interaction takes place. Exploitation requires that the target application actually enable and expose nanomsg's ws transport; TCP- or IPC-only deployments are unaffected. The flaw yields high integrity and availability impact, and while reliable code execution depends on heap layout and platform, no public exploit code has been identified at time of analysis and the vulnerability is not confirmed as actively exploited (not in CISA KEV).
RemediationAI
Upgrade to Nanomsg 1.2.3, the first release containing the fix from PR #1130 (https://github.com/nanomsg/nanomsg/releases/tag/1.2.3, https://github.com/nanomsg/nanomsg/pull/1130); vendor-released patch version 1.2.3 replaces the unbounded sprintf with a bounded snprintf and hardcodes the advertised WebSocket version. If upgrading immediately is not feasible, disable the ws transport in any application build or configuration that does not strictly need it, and ensure any WS listener that must remain enabled is bound only to trusted interfaces or placed behind a proxy/firewall that rejects untrusted handshake traffic - the trade-off is loss of WebSocket-based clients or the need for additional network filtering, and downstream applications statically linking nanomsg must be rebuilt to pick up the patched library.
Affected VersionsENISA
Affected Packages
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
Nanomsg is a C socket library providing scalable messaging patterns (SP, REQ/REP, PUB/SUB, etc.) over transports including TCP, IPC, and WebSocket. The defect is a classic CWE-122 heap-based buffer overflow in src/transports/ws/ws_handshake.c: the server-side handshake reply (nn_ws_handshake_server_reply) copied the client-supplied Sec-WebSocket-Version header into the fixed-size self->response buffer using sprintf, with no bound on the copied length. The upstream fix in PR #1130 both replaces the unsafe sprintf with snprintf bounded by sizeof(self->response) and, more decisively, stops echoing the attacker-controlled version string at all, hardcoding "Sec-WebSocket-Version: 13\r\n" in the reply. Because the overflow occurs while parsing the handshake request headers - before the WebSocket upgrade is completed - the attack surface is the raw listening socket rather than an established session. The CPE cpe:2.3:a:nanomsg:nanomsg:*:*:*:*:*:*:*:* reflects the unversioned wildcard coverage of the affected 0.5-beta-1.2.2 range.
Know when Nanomsg 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:H
Overflow is reachable pre-auth during the WS handshake (PR:N, AC:L); write-based memory corruption yields high integrity and availability impact but no direct confidentiality loss, and stays within the process (S:U).
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
Nanomsg versions 0.5-beta through 1.x before 1.2.3 has a remotely exploitable buffer overflow in the WebSocket transport, due to an unchecked copy of the Sec-WebSocket-Version header, through snprintf.
Executive ViewAI
Nanomsg deployments that expose the WebSocket transport are at risk from a remote heap memory corruption flaw in versions 0.5-beta through 1.x before 1.2.3, which can disrupt services and compromise data integrity. No public exploit identified at time of analysis and no vendor-released patch identified at time of analysis, so leadership should prioritize identifying and restricting externally exposed ws endpoints. TCP- or IPC-only deployments are unaffected, concentrating risk in teams that have enabled ws transport.
No vendor-released patch identified at time of analysis. Disable nanomsg ws transport where not required; restrict network access to trusted sources; use WAF/IDS to block oversized Sec-WebSocket-Version headers; monitor for heap corruption or crashes; isolate exposed services; consider upgrading to nanomsg 1.2.3 or later only if that release is available and confirmed to address the flaw.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
EUVD-2026-85784
GHSA-qf87-675j-h456
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB