@libp2p/crypto · libp2p: ASN.1 DER decoder drives an unbounded synchronous loop on attacker-controlled length fields, stalling the Node
Affects @libp2p/cryptoSource GCVE Database
Not known to be exploited · CVSS 7.5 High : upgrade to 5.1.22 soon.
Data as of 17 Nov 2026, 21:51 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 7.5 |
|---|
- Patch
- Available – fixed in 5.1.22
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 17 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 17 Nov 2026.
What to do
Upgrade @libp2p/crypto to 5.1.22.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npm@libp2p/crypto | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in @libp2p/crypto version 5.1.22. Users should upgrade to this version or later. The fix includes bounds checking on DER length fields and overall sanity caps to prevent unbounded loops and excessive memory allocation. No additional mitigation is required if upgraded.
Description
A vulnerability in the @libp2p/crypto package allows a remote peer to stall a js-libp2p node's event loop for approximately 4–5 seconds per connection by sending a crafted 15-byte publicKey in an Identify message. This malformed key triggers an unbounded synchronous loop in the ASN.1 DER decoder due to improper length field validation, causing high memory allocation (~2 GB) and blocking the node's event loop pre-authentication. The issue affects all nodes running the default Identify service and can be exploited repeatedly by reconnecting. The vulnerability is fixed in version 5.1.22.
References
- github.com/libp2p/js-libp2p/security/advisories/GHSA-rvfr-cqwq-rc4j (opens in a new tab)
- github.com/libp2p/js-libp2p/pull/3587 (opens in a new tab)
- github.com/libp2p/js-libp2p/commit/ef6e1851cb00511a4793a5e68948e0cdad385332 (opens in a new tab)
- github.com/libp2p/js-libp2p (opens in a new tab)
- github.com/libp2p/js-libp2p/releases/tag/crypto-v5.1.22 (opens in a new tab)