libp2p: yamux connection DoS via oversized data frame
A denial-of-service vulnerability exists in the yamux stream multiplexer implementation of py-libp2p (<=0.6.0). The vulnerability arises because the code does not validate incoming DATA frame lengths against the receive window before reading the frame body. An attacker can send a single frame claiming a very large body (up to 4 GB), causing the victim's yamux read loop to block indefinitely and stall all streams on that connection. This requires no special setup beyond completing a standard libp2p handshake.
AI Analysis
Technical Summary
The yamux multiplexer in py-libp2p versions up to 0.6.0 fails to check that the length field of incoming DATA frames fits within the configured receive window before reading the frame body. The length field is a 32-bit unsigned integer, allowing an attacker to specify a frame body size up to 4,294,967,295 bytes. The code reads the frame body unconditionally and sequentially without timeout, causing the read loop to block indefinitely when the data does not arrive. This blocks processing of subsequent frames and stalls all streams on the connection. The vulnerability affects the default new_host() configuration and requires no special privileges. The yamux specification mandates resetting streams that exceed receive window limits, but py-libp2p does not enforce this, unlike other implementations. A proof-of-concept demonstrates that sending a crafted frame causes the victim's yamux connection to deadlock, preventing new streams from opening.
Potential Impact
Successful exploitation results in a denial-of-service condition on the yamux connection, blocking all streams multiplexed over that connection. The victim's read loop stalls indefinitely, preventing any further communication on the affected connection. This does not lead to code execution or data corruption but causes availability loss of the libp2p streams on that connection.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should consider disabling yamux or applying custom validation of frame lengths if possible. Monitoring for unusually large frame length values and implementing timeouts around frame reads could mitigate impact. No official patch or workaround is documented in the provided data.
libp2p: yamux connection DoS via oversized data frame
Description
A denial-of-service vulnerability exists in the yamux stream multiplexer implementation of py-libp2p (<=0.6.0). The vulnerability arises because the code does not validate incoming DATA frame lengths against the receive window before reading the frame body. An attacker can send a single frame claiming a very large body (up to 4 GB), causing the victim's yamux read loop to block indefinitely and stall all streams on that connection. This requires no special setup beyond completing a standard libp2p handshake.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The yamux multiplexer in py-libp2p versions up to 0.6.0 fails to check that the length field of incoming DATA frames fits within the configured receive window before reading the frame body. The length field is a 32-bit unsigned integer, allowing an attacker to specify a frame body size up to 4,294,967,295 bytes. The code reads the frame body unconditionally and sequentially without timeout, causing the read loop to block indefinitely when the data does not arrive. This blocks processing of subsequent frames and stalls all streams on the connection. The vulnerability affects the default new_host() configuration and requires no special privileges. The yamux specification mandates resetting streams that exceed receive window limits, but py-libp2p does not enforce this, unlike other implementations. A proof-of-concept demonstrates that sending a crafted frame causes the victim's yamux connection to deadlock, preventing new streams from opening.
Potential Impact
Successful exploitation results in a denial-of-service condition on the yamux connection, blocking all streams multiplexed over that connection. The victim's read loop stalls indefinitely, preventing any further communication on the affected connection. This does not lead to code execution or data corruption but causes availability loss of the libp2p streams on that connection.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should consider disabling yamux or applying custom validation of frame lengths if possible. Monitoring for unusually large frame length values and implementing timeouts around frame reads could mitigate impact. No official patch or workaround is documented in the provided data.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hmj8-5xmh-5573
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6542179c2644c7f8087d5d
Added to database: 07/25/2026, 23:09:11 UTC
Last enriched: 07/25/2026, 23:49:01 UTC
Last updated: 07/26/2026, 03:44:04 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.