Skip to main content

libwebsockets CVE-2025-11678

HIGH
Stack-based Buffer Overflow (CWE-121)
2025-10-20 prodsec@nozominetworks.com
7.5
CVSS 4.0 · Vendor: nozominetworks
View

Attack ChainAIDerived

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

  1. Access
    Gain adjacent/on-path network position
  2. Delivery
    Sniff victim's outbound DNS request
  3. Exploit
    Forge response with matching transaction ID
  4. Execution
    Embed oversized DNS label
  5. Persist
    Overflow stack label_stack in parser
  6. Impact
    Crash 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

Vendor (nozominetworks) PRIMARY 7.5 HIGH
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
vuln.today AI 7.1 HIGH

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.

3.1 AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:A/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 7.6 HIGH

Primary rating from Vendor (nozominetworks).

CVSS VectorVendor: nozominetworks

Attack Vector
Adjacent
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

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

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Medium
widely-used embedded/IoT library, but vulnerable async-DNS flag is non-default
Data Quality
2 sources
Confidence: Low

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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation· derived
None
System Exposure· derived
Controlled
Automatable· derived
No
Human Impact
Medium

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
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.

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.

Vendor StatusVendor

SUSE

Severity: Moderate

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