Junglewise Threat Intelligence

CVE-2026-86039: libp2p PeerStore peer ID spoofing in signed records

CVE-2026-86039 · Severity: high · CVSS 8.2 · Published 2026-09-17

Executive brief

libp2p's peer discovery system accepts fraudulently signed peer records that claim to represent one peer but are actually signed by an attacker. This allows attackers to inject malicious network addresses into the address book for legitimate peers, causing applications to attempt to connect to attacker-controlled endpoints instead of the real peer. While this doesn't allow an attacker to impersonate a victim in an encrypted connection, it can disrupt network communications and poison peer routing tables.

Technical details

The vulnerability is a signature verification bypass in `@libp2p/peer-store`'s `consumePeerRecord` function. The code verifies that a `PeerRecord` envelope is cryptographically signed, but fails to verify that the signer's peer ID matches the peer ID claimed in the record payload. An attacker can sign an envelope with their own key while embedding a victim peer ID in the payload, causing attacker-controlled multiaddrs to be stored as certified addresses under the victim's identity. The gossipsub Peer Exchange path is reachable because it derives the expected peer from untrusted wire data (`pi.peerID`), allowing an attacker to set it to their own ID while placing the victim ID inside. The missing invariant check is: `peerRecord.peerId.equals(peerIdFromCID(envelope.publicKey.toCID()))`. The attack requires network access to send malicious peer records but no authentication or user interaction.

Affected products

  • libp2p peer-store

Timeline

  • 2026-09-17: disclosed
  • other: CVE-2026-86039 assigned