Security mailing lists by PureSourceCode

CVE-2022-35922

HIGH 7.5CVSS 3.1

Rust-WebSocket memory allocation based on untrusted length

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.

Published
1 Aug 2022
Last modified
12 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-119CWE-400CWE-770
Also known as
GHSA-qrjv-rf5q-qpxcRUSTSEC-2022-0035
Sources
NVDJSONOSV GHSA-qrjv-rf5q-qpxcJSONOSV RUSTSEC-2022-0035JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
OSV GitHub CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD rust-websocket_project rust-websocket
cpe:2.3:a:rust-websocket_project:rust-websocket:*:*:*:*:*:*:*:*
< 0.26.5 0.26.5
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
= 35
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
= 36
OSV crates.io websocket < 0.26.5 0.26.5
OSV crates.io websocket >= 0.0.0-0, < 0.26.5 0.26.5

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 1 Aug 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Aug 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 6 Aug 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.