libwebsockets CVE-2025-11678
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain adjacent/on-path network position
-
DeliverySniff victim's outbound DNS request
-
ExploitForge response with matching transaction ID
-
ExecutionEmbed oversized DNS label
-
PersistOverflow stack label_stack in parser
-
ImpactCrash or execute code in app context
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack 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 | libwebsockets must be COMPILED with the LWS_WITH_SYS_ASYNC_DNS flag enabled - this is the explicit precondition in the description and is NOT the default build, which is the primary limiting factor. The attacker must be able to sniff the victim's outbound DNS request (an on-path or adjacent-network position, consistent with AV:A) and win a race to send a spoofed DNS response whose transaction ID matches the legitimate query (reflected as AT:P). The victim application must itself trigger a DNS resolution (UI:P / passive). The malicious response must carry a DNS label exceeding the maximum length to overflow the fixed label_stack. No authentication is required (PR:N). Builds without async DNS, or deployments where DNS traffic is not observable by the attacker, are not exploitable. |
| Impact | This is a moderate-priority, conditionally-exploitable memory-safety flaw rather than a drop-everything emergency. The CVSS 4.0 vector (AV:A/AC:L/AT:P/PR:N/UI:P, score 7.5 High) is internally consistent with the description: AV:A reflects that the attacker must be positioned to sniff DNS traffic (adjacent/on-path), AT:P reflects the attack requirement of observing and racing a legitimate DNS request, and UI:P reflects that the victim application must itself initiate the DNS lookup. VC:H/VI:H/VA:H correctly capture the high impact of a stack-based overflow (potential code execution or crash). No EPSS score, no CISA KEV listing, and no public POC are present in the input, so exploitation status is 'no public exploit identified at time of analysis' - there is no evidence of widespread or targeted exploitation. The most important risk-limiting signal is NOT in the CVSS metrics: exploitation requires the library to have been COMPILED with the non-default LWS_WITH_SYS_ASYNC_DNS flag, which sharply narrows the real affected population. The high CVSS is therefore driven by impact severity and a plausible on-path attacker, but the compile-time gate plus the need to win a DNS transaction-ID race make real-world mass exploitation unlikely. Treat as a patch-in-normal-cycle item, prioritized higher for devices/products known to enable async DNS and reachable by on-path attackers. |
| Exploit ScenarioDerived | An attacker on the same network segment as a libwebsockets-based device (built with LWS_WITH_SYS_ASYNC_DNS) passively observes an outbound DNS query, then forges a DNS response with the matching transaction ID that contains a DNS label longer than the maximum, overflowing the fixed-size label_stack on the stack. This can crash the process or, if the overflow is controllable, lead to code execution in the context of the application. No public exploit code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Stack-based buffer overflow in the libwebsockets asynchronous DNS resolver (lws_adns_parse_label) can corrupt memory when the library is compiled with the LWS_WITH_SYS_ASYNC_DNS flag, which is not the default build configuration. An attacker positioned to observe a victim's outbound DNS query (adjacent/on-path, AV:A) can race to inject a spoofed response carrying a transaction ID that matches the pending query and a DNS label longer than the maximum supported length, overflowing the fixed label_stack and potentially achieving code execution or denial of service. Exploitation is conditional on the non-default async-DNS build and on the attacker's ability to sniff DNS traffic; no public exploit code has been identified at time of analysis, and the issue is not listed in CISA KEV.
RemediationAI
Apply the upstream fix in libwebsockets commit 2bb9598562b37c942ba5b04bcde3f7fdf66a9d3a; this is an upstream fix available as a PR/commit, and a corresponding tagged patched release version was not independently confirmed from the supplied data, so verify against the vendor's repository and the Nozomi Networks advisory at https://www.nozominetworks.com/labs/vulnerability-advisories-cve-2025-11678. As a compensating control where upgrading is not immediately possible, rebuild libwebsockets without the LWS_WITH_SYS_ASYNC_DNS flag to remove the vulnerable parser from the binary, accepting the trade-off that DNS resolution becomes synchronous/blocking and may cost throughput or responsiveness in event-loop-driven applications. Because the attack depends on an attacker observing the victim's DNS query and racing a matching transaction ID, network-level defenses also reduce exposure: encrypt DNS in transit with DNS-over-TLS or DNS-over-HTTPS, validate with DNSSEC where available, and segment or monitor networks so that adjacent hosts cannot sniff victim DNS traffic; note that DNSSEC/DNS-over-TLS mitigate spoofing but do not fix the underlying overflow, and segmentation is a deployment-level control whose effectiveness depends on accurate network boundaries.
Affected ProductsAI
libwebsockets builds compiled with the LWS_WITH_SYS_ASYNC_DNS option enabled are affected; default builds that do not enable asynchronous DNS are not exposed through this code path. The flaw resides in lws_adns_parse_label and is resolved by the upstream commit 2bb9598562b37c942ba5b04bcde3f7fdf66a9d3a in the libwebsockets repository (https://libwebsockets.org/git/libwebsockets/commit?id=2bb9598562b37c942ba5b04bcde3f7fdf66a9d3a), with additional detail in the Nozomi Networks advisory (https://www.nozominetworks.com/labs/vulnerability-advisories-cve-2025-11678). No CPE identifiers were provided in the source data, so version ranges must be confirmed against the upstream commit history and the vendor's release tagging rather than from an authoritative CPE list.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
libwebsockets is a lightweight C library providing client and server WebSocket, HTTP, and related protocol support; its ADNS subsystem (enabled at compile time via LWS_WITH_SYS_ASYNC_DNS) implements asynchronous DNS resolution over the wire. The function lws_adns_parse_label parses incoming DNS answer labels into a fixed-size stack buffer (label_stack) without adequately validating the label length against that buffer's capacity, a classic CWE-121 stack-based buffer overflow. Because DNS responses are parsed from network data and matched to a pending query by transaction ID, a spoofed reply with a matching ID and an overlong label can reach the vulnerable parser. The flaw is rooted in the label-length handling logic rather than the DNS protocol layer itself, so only builds that compile in the async-DNS path and actually perform asynchronous resolutions expose the vulnerable code path. No CPE strings were supplied in the input data, so affected deployments must be identified by build configuration (LWS_WITH_SYS_ASYNC_DNS enabled) and library version relative to the upstream fix commit 2bb9598562b37c942ba5b04bcde3f7fdf66a9d3a.
Know when the next one hits your stack
- 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:A/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AV:A and AC:H because the attacker must be on-path to sniff and win a DNS transaction-ID race; PR:N (no auth) but UI:R since the app must initiate the lookup; stack overflow yields C/I/A:H.
Primary rating from Vendor (nozominetworks).
CVSS VectorVendor: nozominetworks
DescriptionCVE.org
Stack-based Buffer Overflow in lws_adns_parse_label in warmcat libwebsockets allows, when the LWS_WITH_SYS_ASYNC_DNS flag is enabled during compilation, to overflow the label_stack, when the attacker is able to sniff a DNS request in order to craft a response with a matching id containing a label longer than the maximum.
Executive ViewAI
CVE-2025-11678 is a high-severity memory-corruption flaw in libwebsockets' asynchronous DNS resolver that only affects deployments compiled with the non-default LWS_WITH_SYS_ASYNC_DNS build flag, so organizational exposure is limited to whichever products and engineering teams enabled that option. Where it is enabled, an attacker positioned on the same network path as a victim's outbound DNS query could inject a spoofed response that overflows memory and potentially achieve code execution or denial of service. Leadership should care less about broad enterprise exposure and more about inventory accuracy for that build configuration and about the trust level of networks over which affected DNS traffic travels; no public exploit code or confirmed active exploitation has been identified at time of analysis.
No vendor-released patch identified at time of analysis. Interim mitigations: rebuild affected software without the non-default LWS_WITH_SYS_ASYNC_DNS flag or use the synchronous DNS resolver path; restrict affected components to trusted, non-adjacent networks; enforce DNSSEC validation and encrypted DNS (DoT/DoH) for outbound queries; and monitor DNS response anomalies for spoofing attempts.
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 stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB