{"cve":"CVE-2022-35922","nvd":{"published":"2022-08-01T22:15:10.460","modified":"2026-06-17T04:52:31.603","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-770","CWE-400"],"references":["https://github.com/websockets-rs/rust-websocket/commit/cbf6e9983e839d2ecad86de8cd1b3f20ed43390b","https://github.com/websockets-rs/rust-websocket/security/advisories/GHSA-qrjv-rf5q-qpxc","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4V2EOOU5OLEHVMKAH6BALQXKDKIZRXCI/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HYPNCM4H4OFBIZI6XMJ2DUTS54FT2TWP/","https://github.com/websockets-rs/rust-websocket/commit/cbf6e9983e839d2ecad86de8cd1b3f20ed43390b"],"products":["fedoraproject:fedora","rust-websocket_project:rust-websocket"],"source":"nvd","synced_at":"2026-10-19T21:34:18.502168378+00:00"},"epss":{"cve":"CVE-2022-35922","score":0.01918,"percentile":0.79883,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-qrjv-rf5q-qpxc","url":"https://osv.dev/vulnerability/GHSA-qrjv-rf5q-qpxc","summary":"Rust-WebSocket memory allocation based on untrusted length","modified":"2023-11-08T04:09:52.795702Z","packages":[{"ecosystem":"crates.io","name":"websocket","purl":"pkg:cargo/websocket","ranges":["<0.26.5"],"fixed":["0.26.5"]}]},{"id":"RUSTSEC-2022-0035","url":"https://osv.dev/vulnerability/RUSTSEC-2022-0035","summary":"Unbounded memory allocation based on untrusted length","modified":"2026-10-12T18:00:06.812726782Z","packages":[{"ecosystem":"crates.io","name":"websocket","purl":"pkg:cargo/websocket","ranges":[">=0.0.0-0 <0.26.5"],"fixed":["0.26.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}