Resource exhaustion in Rust-Websocket Project

CVE-2022-35922

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.

Vulnerability class: DoS (Denial of Service)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.

EPSS exploit prediction

EPSS: 0.019 (78.5th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 78th percentile — 78.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2022-35922: held from 0.018 to 0.019.

EPSS over last 30 days · oldest: 0.018 · newest: 0.019 · change: +0.000

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2022-35922?
CVE-2022-35922 is a high-severity vulnerability in Rust-Websocket Project, classified under Uncontrolled Resource Consumption. CVSS score: 7.5/10. Published 2022-08-01.
How severe is CVE-2022-35922?
High severity. CVSS v3 base score is 7.5 out of 10.