---
id: CVE-2026-86038
title: libp2p is a JavaScript implementation of the libp2p networking stack
summary: >-
  libp2p is a JavaScript implementation of the libp2p networking stack. From
  15.0.0 until 16.0.5, @libp2p/gossipsub uses the default StrictSign policy in
  packages/gossipsub/src/utils/buildRawMessage.ts, where validateToRawMessage
  verifies …
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'
cwe:
  - CWE-345
  - CWE-347
vendor: libp2p
product: '@libp2p/gossipsub'
affected:
  - '@libp2p/gossipsub >= 15.0.0, < 16.0.5'
patched:
  - '@libp2p/gossipsub 16.0.5'
published: '2026-09-17'
updated: '2026-09-17'
sourceUpdated: '2026-09-17T18:17:12.203'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-86038'
references:
  - url: >-
      https://github.com/libp2p/js-libp2p/commit/cec2b1f349d130065e561349a0336a239528267f
    label: security-advisories@github.com
  - url: 'https://github.com/libp2p/js-libp2p/pull/3569'
    label: security-advisories@github.com
  - url: 'https://github.com/libp2p/js-libp2p/releases/tag/gossipsub-v16.0.5'
    label: security-advisories@github.com
  - url: >-
      https://github.com/libp2p/js-libp2p/security/advisories/GHSA-c3gv-825q-fvmp
    label: security-advisories@github.com
  - url: >-
      https://github.com/libp2p/js-libp2p/security/advisories/GHSA-c3gv-825q-fvmp
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: 'https://github.com/advisories/GHSA-c3gv-825q-fvmp'
tags:
  - nvd
  - ghsa
  - npm
  - cve.org
  - exploit-available
aliases:
  - GHSA-c3gv-825q-fvmp
ecosystem: npm
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-09-17T17:24:10.344562Z'
ingestedAt: '2026-09-17T16:21:47.714Z'
epss: 0.00193
epssPercentile: 0.07927
---

## Overview

libp2p is a JavaScript implementation of the libp2p networking stack. From 15.0.0 until 16.0.5, @libp2p/gossipsub uses the default StrictSign policy in packages/gossipsub/src/utils/buildRawMessage.ts, where validateToRawMessage verifies a signature with attacker-controlled msg.key but skips binding that key to msg.from when the claimed author is an RSA peer ID that does not inline a public key. An unauthenticated attacker can place a victim RSA peer ID in msg.from, sign the message with the attacker's private key, and supply the attacker's public key in msg.key, causing the message to be accepted and propagated as authored by the victim. Applications that trust message.from for validators, authorization, accounting, moderation, reputation, or audit logging can process attacker-controlled data under false origin attribution. The issue is fixed in version 16.0.5.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-86038)

Affected packages:

- `@libp2p/gossipsub >= 15.0.0, < 16.0.5`

Patched in:

- `@libp2p/gossipsub 16.0.5`

Source: https://github.com/advisories/GHSA-c3gv-825q-fvmp
