Live threats

All CVEs / Rust-websocket Project

CVE-2022-35922Rust-websocket Project Rust-websocket

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
1.9%
probability of exploitation in 30 days · percentile 81
Auth required
No
Published
Aug 1, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-400, CWE-770
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

Rust-WebSocket is a WebSocket (RFC6455) library written in Rust. In versions prior to 0.26.5 untrusted websocket connections can cause an out-of-memory (OOM) process abort in a client or a server. The root cause of the issue is during dataframe parsing. Affected versions would allocate a buffer based on the declared dataframe size, which may come from an untrusted source. When `Vec::with_capacity` fails to allocate, the default Rust allocator will abort the current process, killing all threads. This affects only sync (non-Tokio) implementation. Async version also does not limit memory, but does not use `with_capacity`, so DoS can happen only when bytes for oversized dataframe or message actually got delivered by the attacker. The crashes are fixed in version 0.26.5 by imposing default dataframe size limits. Affected users are advised to update to this version. Users unable to upgrade are advised to filter websocket traffic externally or to only accept trusted traffic.

Original NVD text.

What to do

  1. Apply the vendor's security update for Rust-websocket.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
crates.io websocket < 0.26.5 0.26.5 cargo update -p websocket --precise 0.26.5
crates.io websocket ≥ 0.0.0-0 < 0.26.5 0.26.5 cargo update -p websocket --precise 0.26.5

Per OSV / GitHub Advisories (GHSA-qrjv-rf5q-qpxc, RUSTSEC-2022-0035). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rust-websocket_projectrust-websocket< 0.26.5
fedoraprojectfedora35
fedoraprojectfedora36

Official sources

References

Links published by the sources. Open them with care.