# CVE-2026-86038: libp2p Gossipsub message authentication bypass in RSA peer IDs

Source: https://junglewise.ai/threats/cve-2026-86038-libp2p-gossipsub-message-authentication-bypass-in-rsa-peer-ids  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-17. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-86038 · Severity: high · CVSS 7.5 · Published 2026-09-17

libp2p's Gossipsub is a messaging protocol used in distributed P2P networks to propagate data across peers. A flaw in StrictSign validation allows an attacker to forge messages that appear to come from any victim using an RSA peer ID, undermining message origin verification. Applications relying on message source attribution for access control, moderation, or audit logging can be deceived into trusting attacker-controlled content as legitimate.

Technologies: [Libp2p Gossipsub](https://junglewise.ai/threats/technologies/gossipsub), [@libp2p/gossipsub (npm)](https://junglewise.ai/threats/technologies/libp2p-gossipsub). Vendors: [Libp2p](https://junglewise.ai/threats/vendors/libp2p), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-86038 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-86038 being exploited in the wild.

**How severe is CVE-2026-86038?** High severity, with a CVSS score of 7.5, published 17 September 2026.

**Which products and versions are affected?** Libp2p Gossipsub 15.0.0 and later; @libp2p/gossipsub (npm) >= 15.0.0, < 16.0.5, SEMVER:introduced=15.0.0,fixed=16.0.5.

**Is there a fix for CVE-2026-86038?** Yes. @libp2p/gossipsub (npm): upgrade to 16.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-86038 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-86038?** Check whether you run Libp2p Gossipsub or @libp2p/gossipsub (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @libp2p/gossipsub (npm): upgrade to 16.0.5 or later

  ```sh
  npm install @libp2p/gossipsub@16.0.5
  ```


## Technical details

The vulnerability exists in the `validateToRawMessage` function in `packages/gossipsub/src/utils/buildRawMessage.ts`. When validating signed messages with StrictSign policy, the code checks that a supplied message public key matches the peer ID's public key—but this check is skipped for RSA peer IDs, which do not inline their public key in the peer ID representation. An attacker can set the `from` field to a victim's RSA peer ID, sign the message with their own private key, include their own public key in `msg.key`, and the signature will validate despite the forged origin. The missing invariant is `peerIdFromPublicKey(publicKey).equals(fromPeerId)`. This is a message authentication bypass under the default StrictSign signature policy affecting gossipsub v15.0.0 and later. A patch is required to enforce key-to-peer-ID binding for all peer ID types.

## Affected products

- libp2p Gossipsub 15.0.0 and later

## Identifiers

- CVE-2026-86038
- GHSA-c3gv-825q-fvmp

## Timeline

- 2026-09-17: disclosed

## Related threats

- [libp2p gossipsub denial of service via oversized control messages](https://junglewise.ai/threats/cve-2026-49866-libp2p-gossipsub-denial-of-service-via-oversized-control-messages)
- [libp2p js-libp2p memory exhaustion in @libp2p/gossipsub](https://junglewise.ai/threats/cve-2026-46679-libp2p-js-libp2p-memory-exhaustion-in-libp2p-gossipsub)
