CVE-2025-11678: CWE-121 Stack-based Buffer Overflow in warmcat libwebsocket
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.
AI Analysis
Technical Summary
CVE-2025-11678 is a stack-based buffer overflow vulnerability identified in the warmcat libwebsockets library, version 4.0, specifically within the lws_adns_parse_label function. This function is responsible for parsing DNS labels when the library is compiled with the LWS_WITH_SYS_ASYNC_DNS flag enabled, which enables asynchronous DNS resolution. The vulnerability arises because the label_stack buffer can be overflowed if an attacker crafts a DNS response containing a label longer than the maximum expected length. To exploit this, an attacker must be capable of sniffing DNS requests to obtain the matching DNS transaction ID, then respond with a maliciously crafted DNS packet that triggers the overflow. The overflow can corrupt the stack, potentially allowing an attacker to execute arbitrary code or cause a denial of service by crashing the application. The CVSS 4.0 score of 7.5 reflects a high severity, with attack vector being adjacent (local network), low attack complexity, no privileges required, but user interaction needed. The vulnerability impacts confidentiality, integrity, and availability with high impact. No known public exploits exist yet, but the vulnerability is published and should be treated seriously. The lack of available patches at the time of publication necessitates immediate mitigation steps. This vulnerability is particularly relevant for applications relying on libwebsockets for network communication, especially those using asynchronous DNS resolution in environments where DNS traffic can be intercepted or manipulated.
Potential Impact
For European organizations, the impact of CVE-2025-11678 can be significant, especially for those deploying libwebsockets in critical infrastructure, IoT devices, or embedded systems that rely on asynchronous DNS resolution. Successful exploitation could lead to remote code execution, allowing attackers to gain control over affected systems, exfiltrate sensitive data, or disrupt services. This is particularly concerning for sectors such as telecommunications, manufacturing, and critical infrastructure, where libwebsockets might be embedded in networked devices. The requirement for DNS traffic sniffing limits exploitation to attackers with network access or the ability to perform man-in-the-middle attacks, which could be feasible in poorly segmented or unsecured networks. The vulnerability threatens confidentiality, integrity, and availability, potentially causing operational disruptions and data breaches. Given the widespread use of libwebsockets in various applications, the scope of affected systems could be broad, impacting both enterprise and industrial environments across Europe.
Mitigation Recommendations
1. Disable the LWS_WITH_SYS_ASYNC_DNS flag during compilation if asynchronous DNS resolution is not essential for your application to eliminate the vulnerable code path. 2. Monitor network traffic for unusual DNS responses, especially those with abnormally long labels or unexpected transaction IDs, to detect potential exploitation attempts. 3. Implement network segmentation and DNS traffic encryption (e.g., DNS over TLS or DNS over HTTPS) to reduce the risk of DNS traffic sniffing and manipulation. 4. Apply patches or updates from the libwebsockets project as soon as they become available to address this vulnerability directly. 5. Conduct thorough code audits and penetration testing on applications using libwebsockets to identify and remediate any related vulnerabilities. 6. Employ runtime protections such as stack canaries, address space layout randomization (ASLR), and control flow integrity (CFI) to mitigate exploitation impact. 7. Educate development and security teams about the risks of enabling asynchronous DNS features without proper safeguards.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Sweden
CVE-2025-11678: CWE-121 Stack-based Buffer Overflow in warmcat libwebsocket
Description
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-11678 is a stack-based buffer overflow vulnerability identified in the warmcat libwebsockets library, version 4.0, specifically within the lws_adns_parse_label function. This function is responsible for parsing DNS labels when the library is compiled with the LWS_WITH_SYS_ASYNC_DNS flag enabled, which enables asynchronous DNS resolution. The vulnerability arises because the label_stack buffer can be overflowed if an attacker crafts a DNS response containing a label longer than the maximum expected length. To exploit this, an attacker must be capable of sniffing DNS requests to obtain the matching DNS transaction ID, then respond with a maliciously crafted DNS packet that triggers the overflow. The overflow can corrupt the stack, potentially allowing an attacker to execute arbitrary code or cause a denial of service by crashing the application. The CVSS 4.0 score of 7.5 reflects a high severity, with attack vector being adjacent (local network), low attack complexity, no privileges required, but user interaction needed. The vulnerability impacts confidentiality, integrity, and availability with high impact. No known public exploits exist yet, but the vulnerability is published and should be treated seriously. The lack of available patches at the time of publication necessitates immediate mitigation steps. This vulnerability is particularly relevant for applications relying on libwebsockets for network communication, especially those using asynchronous DNS resolution in environments where DNS traffic can be intercepted or manipulated.
Potential Impact
For European organizations, the impact of CVE-2025-11678 can be significant, especially for those deploying libwebsockets in critical infrastructure, IoT devices, or embedded systems that rely on asynchronous DNS resolution. Successful exploitation could lead to remote code execution, allowing attackers to gain control over affected systems, exfiltrate sensitive data, or disrupt services. This is particularly concerning for sectors such as telecommunications, manufacturing, and critical infrastructure, where libwebsockets might be embedded in networked devices. The requirement for DNS traffic sniffing limits exploitation to attackers with network access or the ability to perform man-in-the-middle attacks, which could be feasible in poorly segmented or unsecured networks. The vulnerability threatens confidentiality, integrity, and availability, potentially causing operational disruptions and data breaches. Given the widespread use of libwebsockets in various applications, the scope of affected systems could be broad, impacting both enterprise and industrial environments across Europe.
Mitigation Recommendations
1. Disable the LWS_WITH_SYS_ASYNC_DNS flag during compilation if asynchronous DNS resolution is not essential for your application to eliminate the vulnerable code path. 2. Monitor network traffic for unusual DNS responses, especially those with abnormally long labels or unexpected transaction IDs, to detect potential exploitation attempts. 3. Implement network segmentation and DNS traffic encryption (e.g., DNS over TLS or DNS over HTTPS) to reduce the risk of DNS traffic sniffing and manipulation. 4. Apply patches or updates from the libwebsockets project as soon as they become available to address this vulnerability directly. 5. Conduct thorough code audits and penetration testing on applications using libwebsockets to identify and remediate any related vulnerabilities. 6. Employ runtime protections such as stack canaries, address space layout randomization (ASLR), and control flow integrity (CFI) to mitigate exploitation impact. 7. Educate development and security teams about the risks of enabling asynchronous DNS features without proper safeguards.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Nozomi
- Date Reserved
- 2025-10-13T09:56:39.308Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68f6402668d8b0c0b42c1773
Added to database: 10/20/2025, 1:59:02 PM
Last enriched: 10/20/2025, 2:13:49 PM
Last updated: 10/20/2025, 4:50:16 PM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-6515: CWE-330 Use of Insufficiently Random Values in oatpp oatpp-mcp
MediumCVE-2025-62429: CWE-94: Improper Control of Generation of Code ('Code Injection') in MacWarrior clipbucket-v5
HighCVE-2025-48025: n/a
UnknownCVE-2025-60856: n/a
MediumCVE-2024-55568: n/a
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.