Intel

AIKIDO-2025-10580

tokio-websockets is vulnerable to Out-of-bounds Read

Out-of-bounds Read Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 25, 2025

71

High Risk

This Affects:

Rusttokio-websockets
0.12.0 - 0.12.0
Fixed in 0.12.1
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to Out-of-bounds Access due to improper bounds checking when handling partial writes in vectored I/O. The vulnerability occurs when processing the first frame in the queue: if bytes_written exceeds the header length but is larger than the payload length, the unsafe get_unchecked call attempts to create a slice starting beyond the payload buffer boundaries. An attacker could exploit this by sending a large number of messages rapidly, triggering partial writes and causing the bytes_written value to corrupt memory or read out-of-bounds data, potentially leading to a denial of service or information disclosure.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

tokio-websockets is vulnerable to Out-of-bounds Read in versions 0.12.0 - 0.12.0.

How to fix this

Upgrade the tokio-websockets library to the patch version.