libwebsockets HTTP/2 HPACK Path Header Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability
The HTTP/2 HPACK path header parsing in libwebsockets did not properly validate user-supplied data, allowing a write past the end of an allocated buffer. A remote, unauthenticated attacker could exploit this to execute code in the context of the current process.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of libwebsockets. Authentication is not required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the HPACK path header value was copied into a fixed-size buffer without checking its length against the buffer size.
Impact
A remote unauthenticated attacker could write past the end of a buffer and potentially execute arbitrary code in the context of the current process.
What the attacker needed
Network access to a libwebsockets service; no authentication required
The fix
The vendor issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
libwebsockets is a library that lets programs speak WebSocket and HTTP/2. When it read a particular part of an incoming HTTP/2 request (the path header), it trusted the length of the data too much and wrote more bytes than the memory buffer could hold. That kind of overflow can let an attacker take over the program, and here no login was needed.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.