libwebsockets
CVE-2025-11680
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessHost site with crafted PNG
-
DeliveryVictim visits attacker page
-
ExploitPNG big width triggers integer overflow
-
ExecutionUndersized heap buffer allocated
-
PersistOOB write in unfilter_scanline
-
ImpactApplication crash (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the target application to be compiled with the non-default LWS_WITH_UPNG flag AND to use the libwebsockets HTML display stack (its experimental HTML/CSS rendering path that decodes PNGs). The victim must then visit an attacker-controlled website serving a crafted PNG whose large width value triggers an integer overflow used to size a heap allocation (UI:A victim interaction, AT:P specific crafted-input requirement, AC:H). It is unauthenticated (PR:N) and network-delivered, but the two compile-time/runtime feature gates plus required user interaction sharply limit the exposed population; most libwebsockets deployments do not enable the UPNG/HTML display stack. |
| Impact | This is a genuinely low-to-moderate real-world risk despite the memory-corruption class. The vendor CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H, score 5.9) correctly scopes impact to availability only (VA:H) - the described outcome is a heap out-of-bounds write that 'possibly causes a crash,' with no confidentiality or integrity impact claimed. Exploitation is heavily gated: it only applies when libwebsockets is compiled with the non-default LWS_WITH_UPNG flag AND the experimental HTML display/rendering stack is actually used, and it needs victim user interaction (UI:A - visiting an attacker-controlled site). EPSS is low at 0.39% (31st percentile), there is no CISA KEV listing, and no public exploit code is referenced - only a vendor advisory and the fix commit. The AC:H / AT:P metrics reflect that a specifically crafted PNG with an oversized width must trigger an integer overflow that undersizes the heap allocation. Signals are internally consistent: moderate CVSS driven by VA:H, low EPSS, no exploitation evidence. No conflicting data - the one caveat is that OOB heap writes can sometimes be escalated beyond a crash to code execution, but neither the description nor the vendor rating claims that here, so it should be treated as a DoS until proven otherwise. |
| Exploit ScenarioDerived | An attacker hosts a web page containing a malicious PNG whose declared width is large enough to overflow the integer used to compute a heap allocation size. A victim running an application built on libwebsockets with LWS_WITH_UPNG and the HTML display stack visits the page; the undersized buffer is written past its bounds while decoding the scanline, crashing the client. No public proof-of-concept is referenced, and the high attack complexity (AC:H) plus required user interaction make opportunistic mass exploitation unlikely. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 01, 2026
An attacker-supplied PNG image can drive an out-of-bounds heap write in libwebsockets' UPNG decoder when a crafted oversized width value overflows the arithmetic used to size a heap allocation. Only deployments compiled with the non-default LWS_WITH_UPNG flag that also exercise the library's HTML display stack are exposed, and exploitation additionally requires a user to visit an attacker-controlled page serving the malicious PNG, so the realistically reachable population is small. Impact is limited to a crash or denial of service (availability only, no confidentiality or integrity loss); no public exploit code has been identified at time of analysis and EPSS is low at 0.39% (31st percentile).
RemediationAI
Apply the upstream fix commit 2b715249f39291c86443b969a1088d59b6a89b78 from the libwebsockets repository (https://libwebsockets.org/git/libwebsockets/commit?id=2b715249f39291c86443b969a1088d59b6a89b78) or upgrade to a libwebsockets release that incorporates it; because the fix is delivered as a repository commit, confirm whether your distribution or vendor has shipped a tagged release containing it before relying on package updates alone. Where an upgrade cycle cannot be met immediately, the most effective compensating control is to rebuild libwebsockets without the LWS_WITH_UPNG compile flag, which removes the vulnerable decoder entirely and eliminates this attack surface at the cost of losing UPNG-based image decoding; similarly, avoid enabling or invoking the HTML display stack in untrusted-content scenarios, since that path is a prerequisite for delivering the crafted PNG. Blocking external PNG content is a weaker but lower-effort alternative: sanitize or strip embedded images from HTML processed by the display stack, or restrict rendering of attacker-controlled markup to isolated, resource-capped processes so that a memory-corruption crash cannot take down the parent service, accepting reduced rendering fidelity and added operational complexity. Per the vendor reference, no public exploit code has been identified at time of analysis and EPSS is 0.39%, so prioritization should reflect the narrow configuration prerequisites rather than the raw CWE-787 classification.
Affected ProductsAI
The affected component is warmcat libwebsockets when it is compiled with the non-default LWS_WITH_UPNG option enabled and when the application uses the library's HTML display stack to decode and render PNG images; builds without LWS_WITH_UPNG, or builds that never exercise the HTML display path, are not exposed. No CPE identifiers were supplied in the intelligence feed, so the affected set is best defined by configuration rather than by a version list: any libwebsockets release that includes the vulnerable unfilter_scanline implementation of the UPNG decoder prior to the upstream fix commit is in scope. The upstream correction is recorded in the project repository at https://libwebsockets.org/git/libwebsockets/commit?id=2b715249f39291c86443b969a1088d59b6a89b78, and Nozomi Networks published the originating advisory at https://www.nozominetworks.com/labs/vulnerability-advisories-cve-2025-11680 (reported by prodsec@nozominetworks.com, tagged Buffer Overflow and Memory Corruption).
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
The flaw sits in unfilter_scanline, the routine inside libwebsockets' bundled UPNG PNG decoder that reverses PNG per-scanline filtering (Sub/Up/Average/Paeth) during image decompression, classified as CWE-787 (Out-of-bounds Write). When libwebsockets is built with the compile-time LWS_WITH_UPNG option and the experimental HTML/CSS display stack is used to render HTML that embeds PNG content, a crafted PNG declaring a very large width causes an integer overflow in the size calculation for the destination heap buffer. Because the allocation is sized from the overflowed (too small) value while the decoder then writes scanline data based on other, larger values, the write runs past the end of the heap buffer, corrupting adjacent memory and typically causing an abort. Per the authoritative assessment the vector is CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H: network-delivered and unauthenticated, but attack complexity is high and the victim must interact, with scope unchanged and impact confined to availability. Two feature gates (the LWS_WITH_UPNG build flag and the HTML display code path) sharply narrow the exposed population, since the UPNG decoder and HTML rendering path are not enabled in typical libwebsockets deployments.
Know when Libwebsockets 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:H/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Crafted PNG delivered over the network to a victim who must browse (UI:R); integer-overflow trigger plus niche build config warrants AC:H; crash-only impact gives A:H with C:N/I:N.
Primary rating from Vendor (nozominetworks).
CVSS VectorVendor: nozominetworks
DescriptionCVE.org
Out-of-bounds Write in unfilter_scanline in warmcat libwebsockets allows, when the LWS_WITH_UPNG flag is enabled during compilation and the HTML display stack is used, to write past a heap allocated buffer possibly causing a crash, when the user visits an attacker controlled website that contains a crafted PNG file with a big width value that causes an integer overflow which value is used for determining the size of a heap allocation.
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.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
More in Libwebsockets
View allAn out-of-bounds heap write in libwebsockets' HTTP/2 HPACK header decoder lets unauthenticated remote attackers corrupt
Out-of-bounds write in warmcat libwebsockets 4.5.0 allows remote unauthenticated attackers to corrupt process memory by
Unbounded memory allocation in warmcat libwebsockets up to 4.5.8 allows remote unauthenticated attackers to exhaust serv
Denial of service is possible in libwebsockets because the LEJP JSON parser's pre-patch bounds checks in lib/misc/lejp.c
A heap out-of-bounds read in libwebsockets' lws_upng_emit_next_line() function can crash an application when the library
NVD
CVE.org
EPSS
VulDB
GitHub PoC
Exploit-DB