Medium · 5.3 Node.js & npm GHSA-vrf4-mx87-p53w CVE-2026-86039 GHSA-c3gv-825q-fvmp CVE-2026-86038
Two libp2p Spoofing Flaws Let Attackers Forge Peer Records and Gossipsub Messages
Two authentication-bypass vulnerabilities in the JavaScript libp2p stack allow attackers to forge peer identity data: one lets attackers plant poisoned addresses for a victim peer in @libp2p/peer-store, the other lets attackers impersonate a victim's RSA peer ID in @libp2p/gossipsub messages. Both are fixed in updated package versions.
AI summary
Two related vulnerabilities have been disclosed in libp2p, the JavaScript implementation of the libp2p peer-to-peer networking stack. Both involve insufficient verification of signed data, allowing an attacker to make the network treat attacker-controlled content as if it originated from a victim peer. One affects the @libp2p/peer-store package's handling of signed peer records; the other affects the @libp2p/gossipsub package's message signature validation. Fixed versions are available for both.
What happened
Two separate authentication-bypass issues were found in libp2p packages. In @libp2p/peer-store (CVE-2026-86039, GHSA-vrf4-mx87-p53w), the consumePeerRecord logic verifies the signature on a RecordEnvelope but does not require that the PeerRecord's peerId field matches the signer's peer ID. Combined with how the gossipsub Peer Exchange path supplies the 'expectedPeer' value, an attacker can sign a record with their own key while listing a victim's peer ID and attacker-controlled multiaddrs in the payload, causing PeerStore to store these as certified addresses for the victim. In @libp2p/gossipsub (CVE-2026-86038, GHSA-c3gv-825q-fvmp), the default StrictSign message-validation policy verifies a message signature against an attacker-supplied public key but does not bind that key to the claimed 'from' peer ID when that ID is an RSA peer ID without an inlined public key. This lets an attacker sign a message with their own key while claiming a victim's RSA peer ID as the author, causing the message to be accepted and propagated as if it came from the victim.
Technical cause
Both issues stem from incomplete binding between a cryptographic signer and the identity claimed in the signed payload (CWE-290, Authentication Bypass by Spoofing, for the peer-store issue; CWE-345, Insufficient Verification of Data Authenticity, for the gossipsub issue). In the peer-store case, the code in packages/peer-store/src/index.ts checks only that the envelope's signer matches the 'expectedPeer' option, not that the payload's own peerId field matches the signer. In the gossipsub case, the code in packages/gossipsub/src/utils/buildRawMessage.ts validates the signature against the supplied key but does not verify that this key actually corresponds to the RSA peer ID named in the message's 'from' field when no public key is inlined in that ID.
Why it matters
The peer-store flaw can cause address-book corruption, dial redirection or failure, routing manipulation, and reachability disruption for a victim peer, because other nodes may store and act on attacker-controlled addresses believing them to be certified for the victim. However, the libp2p connection upgrade process still independently verifies the remote peer's identity, so this does not by itself allow a full identity takeover. The gossipsub flaw allows false origin attribution: applications that rely on the message 'from' field for validators, authorization, accounting, moderation, reputation, or audit logging can be made to process attacker-controlled data as if it were submitted by a trusted victim peer.
Who is affected
Any application using @libp2p/peer-store versions from 8.0.0 up to (but not including) 12.0.24 is affected by CVE-2026-86039. Any application using @libp2p/gossipsub versions from 15.0.0 up to (but not including) 16.0.5 is affected by CVE-2026-86038. Both packages are part of the npm ecosystem used in JavaScript/Node.js libp2p deployments.
Affected versions
@libp2p/peer-store: versions >= 8.0.0 and < 12.0.24 are affected; fixed in 12.0.24. @libp2p/gossipsub: versions >= 15.0.0 and < 16.0.5 are affected; fixed in 16.0.5.
Fixes and mitigation
Both issues are resolved in updated package releases. @libp2p/peer-store is fixed in version 12.0.24. @libp2p/gossipsub is fixed in version 16.0.5. No workarounds beyond upgrading are described in the available advisories.
Recommended action
Upgrade @libp2p/peer-store to version 12.0.24 or later, and upgrade @libp2p/gossipsub to version 16.0.5 or later. Applications that make trust, authorization, moderation, or logging decisions based on gossipsub message origin ('from') or on stored peer addresses should review whether those decisions could be affected by forged data prior to applying the updates.
PatchBriefing score
5.3 / 10 · Medium
Official CVSS: 8.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
Why this score
CVE-2026-86039 has a CVSS base score of 8.2, driven by network-based, low-complexity exploitation requiring no privileges or user interaction and resulting in a high integrity impact plus a low availability impact. CVE-2026-86038 has a CVSS base score of 7.5, also network-based, low-complexity, and requiring no privileges or interaction, with a high integrity impact but no confidentiality or availability impact. Patchwire scores of 5.3 and 4.9 respectively reflect these CVSS bases combined with the facts that both are unauthenticated, remotely exploitable issues requiring no user interaction, but with no evidence of known exploitation, public exploit code, or EPSS-driven urgency, and fixes are already available for both.
Affected versions
- @libp2p/peer-store >= 8.0.0, < 12.0.24
- vulnerable
- ≥ 12.0.24
- patched
- @libp2p/gossipsub >= 15.0.0, < 16.0.5
- vulnerable
- ≥ 16.0.5
- patched
Reported fixes
Both issues are resolved in updated package releases. @libp2p/peer-store is fixed in version 12.0.24. @libp2p/gossipsub is fixed in version 16.0.5. No workarounds beyond upgrading are described in the available advisories.
How this was built
4 source records were collected, matched and used to prepare the report above.
-
GitHub Advisory Database database
-
NVD (NIST) database
-
GitHub Advisory Database database
-
NVD (NIST) database
Revision history
- Published
- Generated
Related
Relevant changes for the stacks you follow.
Choose your stacks, topics and optional WordPress plugins. At 07:00 CEST, matching advisories and releases from the reporting period are grouped into one email.
✓ Choose stacks and topics✓ Change preferences anytime✓ One grouped email