Vulnerability in @libp2p/peer-store (CVE-2026-86039)
Summary
Vulnerability in @libp2p/peer-store (CVE-2026-86039). Data can be tampered with by attackers. Exploitable via PeerRecord. Mitigation: upgrade to 12.0.24 or later.
Original description
The description as published by the source.
Summary
@libp2p/peer-store accepts a signed PeerRecord whose envelope is signed by one peer but whose payload claims a different peer ID. The vulnerable consumePeerRecord path verifies the envelope signature, but does not verify that the envelope signer is the same peer as the wrapped PeerRecord.peerId. As a result, an attacker can sign a record with their own key while placing a victim peer ID in the payload, causing attacker-controlled multiaddrs to be stored as certified addresses for the victim.
Details
The vulnerable code is in packages/peer-store/src/index.ts:
RecordEnvelope.openAndCertify(buf, PeerRecord.DOMAIN, options)verifies the envelope signature.const peerId = peerIdFromCID(envelope.publicKey.toCID())derives the envelope signer peer ID.- The optional
expectedPeercheck only comparesexpectedPeerto the envelope signer. const peerRecord = PeerRecord.createFromProtobuf(envelope.payload)decodespeerRecord.peerIdfrom attacker-controlled signed payload bytes.this.patch(peerRecord.peerId, { peerRecordEnvelope: buf, addresses: ... isCertified: true })stores the addresses under the payload peer ID, not the verified signer peer ID.
The missing invariant is:
peerRecord.peerId.equals(peerIdFromCID(envelope.publicKey.toCID()))
packages/protocol-identify/src/utils.ts already performs this check and can be used as the reference behavior:
if (!peerRecord.peerId.equals(envelopePeer)) {
throw new InvalidMes…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-86039 has been found in @libp2p/peer-store.
Attackers can target a specific entry point like PeerRecord over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 8.2/10.
What to do: upgrade @libp2p/peer-store to 12.0.24 or later.
If unsure, ask your IT team or search "@libp2p/peer-store CVE-2026-86039" on the vendor's site.
CVE-2026-86039 (@libp2p/peer-store) — CWE-290 / CVSS v3 8.2
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: PeerRecord / consumePeerRecord / PeerRecord.peerId / expectedPeer
Patched: 12.0.24 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-290) exists in @libp2p/peer-store. Attackers reach the vulnerable code path via PeerRecord without authentication.
Check the vendor advisory for the affected versions of @libp2p/peer-store. Attack surface: PeerRecord / consumePeerRecord / PeerRecord.peerId / expectedPeer.
Severity: High (CVSS 8.2/10). Data can be tampered with by attackers.
Update to 12.0.24.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@libp2p/peer-store' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@libp2p/peer-store' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@libp2p/peer-storeを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade @libp2p/peer-store to 12.0.24ステージング環境で 12.0.24 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com