Read the docs
TI-2022-16349 Aliases CVE-2022-35922GHSA-qrjv-rf5q-qpxc

Memory allocation based on untrusted length in rust-websocket

Priority MEDIUM 43CWE-400Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01918 80th percentileScored 2026-11-07
Fix Fixed rust-websocket (websockets-rs): 0.26.5websocket (crates.io): 0.26.5

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
websockets-rsrust-websocketbefore 0.26.50.26.5Patch availableCNA
—websocket (crates.io)before 0.26.50.26.5Patch availableGHSA-qrjv-rf5q-qpxc
  • rust-websocket Vendorwebsockets-rs Affected before 0.26.5 Fixed in 0.26.5 Patch available CNA
  • websocket (crates.io) Vendor— Affected before 0.26.5 Fixed in 0.26.5 Patch available GHSA-qrjv-rf5q-qpxc

CPE configurations NVD · 3

CPEVersionsRoleVendor
cpe:2.3:a:rust-websocket_project:rust-websocket:*:*:*:*:*:*:*:*before 0.26.5VulnerableRust-websocket Project
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*35VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*36VulnerableFedoraproject
  • cpe:2.3:a:rust-websocket_project:rust-websocket:*:*:*:*:*:*:*:* Versions before 0.26.5 Vulnerable ·Rust-websocket Project
  • cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject

Remediation

  • Fix · CNA rust-websocket (websockets-rs) Fixed in 0.26.5
  • Fix · GHSA-qrjv-rf5q-qpxc websocket (crates.io) Fixed in 0.26.5 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-35922
  2. 2026-10-03 Alias added: GHSA-qrjv-rf5q-qpxc

References

Sources