CVE-2026-31814
Rust vulnerability analysis and mitigation

Overview

CVE-2026-31814 is a remote denial-of-service vulnerability in the Rust implementation of Yamux (rust-yamux), a stream multiplexer over reliable ordered connections such as TCP/IP. A specially crafted WindowUpdate frame can cause an arithmetic overflow (integer wraparound) in send-window accounting, triggering a panic in the connection state machine. The vulnerability affects rust-yamux versions 0.13.0 through 0.13.8 and was disclosed on March 13, 2026. It carries a CVSS v3.1 score of 7.5 (High) and a CVSS v4.0 score of 8.7 (High) (Github Advisory, libp2p Advisory).

Technical details

The root cause is an integer overflow or wraparound (CWE-190) in the increase_send_window_by function within flow_control.rs. When a remote peer sends a WindowUpdate frame with a very large credit value (e.g., 0xFFFF_0000), adding that credit to the current u32 send-window causes an unchecked arithmetic overflow, which previously triggered a Rust panic! via .expect(). The fix (PR #221, commit b1aae09) replaced .expect() calls with checked_add/checked_sub returning a Result, and introduced a new ConnectionError::InvalidWindowUpdate variant to gracefully terminate the connection instead of panicking. No authentication or special privileges are required — only the ability to establish a Yamux session with the target (libp2p Advisory, Fix Commit).

Impact

Successful exploitation results in a remote, unauthenticated denial of service: the Yamux connection state machine panics and the connection is terminated. Because the attacker can repeatedly reconnect and replay the two-frame sequence, the impact is persistent and can render any service relying on rust-yamux (including libp2p-based peer-to-peer nodes) continuously unavailable. There is no confidentiality or integrity impact — data exfiltration and unauthorized modification are not possible through this vulnerability (Github Advisory).

Exploitability

A detailed proof-of-concept attack scenario is publicly documented in the official security advisory, providing specific, reproducible steps and example credit values (e.g., 0xFFFF_0000) sufficient to trigger the panic (libp2p Advisory). The vulnerability was originally reported by @revofusion through the Ethereum Foundation bug bounty program. The EPSS score is approximately 0.035–0.066%, indicating low but non-negligible exploitation probability. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA KEV catalog.

Exploitation steps

  1. Identify target: Locate a network-accessible service running rust-yamux versions 0.13.0–0.13.8 (e.g., a libp2p node). No authentication is required.
  2. Establish a Yamux session: Connect to the target over TCP/IP and complete the Yamux handshake to open a session.
  3. Open a stream: Send a validly encoded Yamux DATA + SYN frame to create a new stream on the target, establishing initial per-stream send-window state (DEFAULT_CREDIT).
  4. Send malformed WindowUpdate: On the newly opened stream, send a WindowUpdate frame with a very large credit value (e.g., 0xFFFF_0000) such that adding this credit to the current u32 send-window causes an integer overflow.
  5. Trigger panic: The unpatched increase_send_window_by function calls .expect("send window not to exceed u32") on the overflowed result, causing a Rust panic that crashes the connection state machine and terminates the target's Yamux connection.
  6. Repeat for persistent DoS: Reconnect and replay the two-frame sequence to continuously crash the target service (libp2p Advisory).

Indicators of compromise

  • Network: Repeated short-lived TCP connections to the Yamux service port from the same or rotating source IPs; connections that terminate abruptly after sending only two frames.
  • Logs: Rust panic messages in application logs referencing "send window not to exceed u32" or connection/stream/flow_control.rs; log entries containing "could not increase the send window" (post-patch, indicating attempted exploitation against a patched node).
  • Process: Unexpected process crashes or restarts of the libp2p/Yamux-based service; watchdog or supervisor logs showing repeated service restarts in a short time window.

Mitigation and workarounds

The fix is available in rust-yamux v0.13.9, released March 2, 2026. Users should upgrade their yamux Cargo dependency to >= 0.13.9 immediately. The patch replaces unchecked arithmetic with checked_add/checked_sub and gracefully terminates the connection with a protocol error instead of panicking. If immediate patching is not possible, implement network-level controls (e.g., firewall rules, allowlists) to restrict Yamux service access to trusted peers only (libp2p Advisory, v0.13.9 Release).

Community reactions

The vulnerability was originally submitted by @revofusion to the Ethereum Foundation bug bounty program, highlighting its relevance to blockchain and peer-to-peer infrastructure that relies on libp2p. The advisory was published by the libp2p maintainer jxs and reviewed promptly. No significant broader media coverage or notable public researcher commentary beyond the advisory itself has been identified.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

sid

rust-yamux: 0.13.9+ds-1

Fixed

trixie

rust-yamux

Affected

Ubuntu

Unknown

devel

rust-yamux

Unknown

resolute

rust-yamux

Unknown

resolute (esm-apps)

rust-yamux

Unknown

SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-m3wp-48jr-vr4gHIGH7.5
  • Rust logoRust
  • mistralrs-server-core
NoYesSep 10, 2026
GHSA-wfgq-w7cq-qj7jHIGH7.2
  • Rust logoRust
  • mistralrs-server-core
NoYesSep 10, 2026
CVE-2026-45056MEDIUM6.9
  • Rust logoRust
  • matrix-sdk-crypto
NoYesSep 11, 2026
CVE-2026-53956MEDIUM5.4
  • Python logoPython
  • rattler_cache
NoYesSep 09, 2026
CVE-2026-45057MEDIUM4.9
  • Rust logoRust
  • matrix-sdk-ui
NoYesSep 11, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management