CVE-2025-1866 Undefined Behavior Due to Out-of-Bounds Pointer Arithmetic in libwebsockets

Critical 10.0 Published Updated

Out-of-bounds pointer arithmetic in libwebsockets on Win32 can cause memory corruption, requiring non-default CMake configurations to trigger.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-1866?

CVE-2025-1866 is a critical memory corruption vulnerability in warmcat libwebsockets, published on 3 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in warmcat libwebsockets allows Pointer Manipulation, potentially leading to out-of-bounds memory access. This issue affects libwebsockets before 4.3.4 and is present in code built specifically for the Win32 platform.

By default, the affected code is not executed unless one of the following conditions is met:

LWS_WITHOUT_EXTENSIONS (default ON) is manually set to OFF in CMake. LWS_WITH_HTTP_STREAM_COMPRESSION (default OFF) is manually set to ON in CMake. Despite these conditions, when triggered in affected configurations, this vulnerability may allow attackers to manipulate pointers, potentially leading to memory corruption or unexpected behavior.

Weakness: CWE-119

Which versions are affected by CVE-2025-1866?

How do I fix CVE-2025-1866?

No fix has been published for CVE-2025-1866 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-1866 being exploited?

There is no known exploitation of CVE-2025-1866 in the wild and no public exploit code.

Sources

Also known as GHSA-w9v7-r27g-jrmx.

Is CVE-2025-1866 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free