CVE-2022-35922None▾ SunlitUnbounded memory allocation based on untrusted length
▾ Sunlit zone — Low / medium · no exploitation signal
impact 2.8 · likelihood 0.4 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Oct 13.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
1.9%
1.9% → 1.9%
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.
This is a security concern for you, if
The crashes are fixed in version 0.26.5 by imposing default dataframe size limits. Affected users are advised to update to this version.
Note that default memory limits are rather large (100MB dataframes and 200 MB messages), so they can still cause DoS in some environments (i.e. 32-bit). New API has been added to fine tune those limits for specific applications.
This issue was reported by Evan Richter at ForAllSecure and found with Mayhem and Cargo Fuzz.
websocket >= 0.0.0-0, < 0.26.5Upgrade to a patched release:
websocket 0.26.5