CVE-2022-35922

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2022-35922
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35922.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-35922
Aliases
Published
2022-08-01T22:15:10Z
Modified
2024-05-14T12:06:32.288928Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/websockets-rs/rust-websocket

Affected ranges

Type
GIT
Repo
https://github.com/websockets-rs/rust-websocket
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*

v0.19.0
v0.19.1
v0.19.2
v0.20.0
v0.20.1
v0.20.2
v0.20.3
v0.20.4
v0.21.0
v0.21.1
v0.22.0
v0.22.2
v0.22.3
v0.22.4
v0.23.0
v0.24.0
v0.26.1
v0.26.2
v0.26.3
v0.26.4