vendor:
Websockify C implementation
by:
RedTeam Pentesting
7,5
CVSS
HIGH
Buffer Overflow
119
CWE
Product Name: Websockify C implementation
Affected Version From: all versions <= 0.8.0
Affected Version To: versions since commit 192ec6f (2016-04-22) [0]
Patch Exists: YES
Related CWE: GENERIC-MAP-NOMATCH
CPE: a:kanaka:websockify
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: None
2016
Advisory: Websockify: Remote Code Execution via Buffer Overflow
For each new connection, websockify forks and calls the function do_handshake() to receive a client's WebSocket handshake. The following excerpt shows some of the source code responsible for receiving the client's data from the socket file descriptor: The function ws_recv() reads data from the socket file descriptor into the buffer handshake. The loop reads up to 4096 bytes of data from the socket and stores it in the buffer. The loop is limited to 10 iterations, which means that up to 40960 bytes of data can be read from the socket. The buffer is not checked for size before the data is written to it. This can be used to trigger a buffer overflow.
Mitigation:
Upgrade to versions since commit 192ec6f (2016-04-22) [0]