CVE-2024-32984: Yamux :pending_frames Property Vulnerability
HIGHCVE-2024-32984 is a HIGH (CVSS 7.5) :pending_frames property vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Yamux libraries in the crates.io ecosystem. The issue involves :pending_frames property. Remediation is available by upgrading affected packages to version 0.13.2.
CVE-2024-32984 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-32984
To remediate this vulnerability, upgrade all affected Yamux dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade yamux to 0.13.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for yamux
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-32984, inspect your project dependencies for Yamux:
inspect dependencies for yamux
Analyze the terminal output to locate any version of Yamux in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Yamux, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-32984 Affected Yamux Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
yamux
|
crates.io |
≥ 0.13.0
< 0.13.2
|
0.13.2
|
References
Frequently Asked Questions
What is CVE-2024-32984?
Which Yamux versions are affected?
What version fixes CVE-2024-32984?
Is yamux affected?
What is the CVSS score of CVE-2024-32984?
What CWE is associated with CVE-2024-32984?
How can I check crates.io dependencies for CVE-2024-32984?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3999-5ffv-wp2r",
"modified" : "2024-05-01T16:40:49Z",
"published" : "2024-05-01T16:40:49Z",
"aliases" : [ "CVE-2024-32984" ],
"summary" : "Yamux Memory Exhaustion Vulnerability via Active::pending_frames property ",
"details" : "### Summary\n\nAttack scenario\nThe Rust implementation of the Yamux stream multiplexer uses a vector for pending frames. This vector is not bounded in length. Every time the Yamux protocol requires sending of a new frame, this frame gets appended to this vector. This can be remotely triggered in a number of ways, for example by:\n\n1. Opening a new libp2p Identify stream. This causes the node to send its Identify message. Of course, every other protocol that causes the sending of data also works. The larger the response, the more data is enqueued.\n2. Sending a Yamux Ping frame. This causes a Pong frame to be enqueued.\n\nUnder normal circumstances, this queue of pending frames would be drained once they’re sent out over the network. However, the attacker can use TCP’s receive window mechanism to prevent the victim from sending out any data: By not reading from the TCP connection, the receive window will never be increased, and the victim won’t be able to send out any new data (this is how TCP implements backpressure). Once this happens, Yamux’s queue of pending frames will start growing indefinitely. The queue will only be drained once the underlying TCP connection is closed.\n\nComponents\nhttps://github.com/libp2p/rust-yamux/blob/yamux-v0.13.1/yamux/src/connection.rs#L289\n\n### Details\nThis attack is inspired by the HTTP/2 Rapid Reset Attack (CVE 2023-44487), HTTP/2 Ping Flood (CVE-2019-9512), and the QUIC Path Validation attack (see my blog post: https://seemann.io/posts/2023-12-18-exploiting-quics-path-validation/).\n\n### Impact\nAn attacker can cause a remote node to run out of memory, which will result in the corresponding process getting terminated by the operating system.\n\nDepending on the application protocols running on top of rust-libp2p, higher amplification factors are possible. For example, image a protocol that sends out 10 MB of data as a result of an incoming request. By issuing that request and sending a Yamux stream window update (together ~100-200 bytes), the victim would now enqueue the entire 10 MB into its frame buffer. Any block transfer / sync protocols might be good candidates.\n\nIn addition to consuming huge amounts of memory, this attack also drives up the victim's CPU load, such that the allocation of memory at some point becomes CPU-limited.\n\nThis was originally submitted by @marteen-seemann to the Ethereum Foundation bug bounty program.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "yamux"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.13.0"
}, {
"fixed" : "0.13.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/libp2p/rust-yamux/security/advisories/GHSA-3999-5ffv-wp2r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-32984"
}, {
"type" : "WEB",
"url" : "https://github.com/libp2p/rust-yamux/commit/460baf2ccb7d5982b266cb3cb9c0bdf75b4fb779"
}, {
"type" : "WEB",
"url" : "https://github.com/sigp/rust-yamux/commit/6689e227a48258a52347cd1d984adfc94afc6f7a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/libp2p/rust-yamux"
}, {
"type" : "WEB",
"url" : "https://github.com/libp2p/rust-yamux/blob/yamux-v0.13.1/yamux/src/connection.rs#L289"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-01T16:40:49Z",
"nvd_published_at" : "2024-05-01T11:15:47Z"
}
}