GHSA-wc36-xgcc-jwpr: Libp2p core Failure To Verify The Public Vulnerability

HIGH
Published
Advisory Summary

GHSA-wc36-xgcc-jwpr is a HIGH failure to verify the public vulnerability (General Security Weakness) affecting Libp2p core libraries in the crates.io ecosystem. The issue involves failure to verify the public key of a `signedenvelope` against the `peerid` in a `peerrecord`. Remediation is available by upgrading affected packages to version 0.30.2.

GHSA-wc36-xgcc-jwpr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wc36-xgcc-jwpr
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Libp2p core
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-wc36-xgcc-jwpr

To remediate this vulnerability, upgrade all affected Libp2p core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

libp2p-core fixed: 0.30.2
Upgrade libp2p-core to 0.30.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for libp2p-core

How to Check if You Are Affected

To determine whether your application is affected by GHSA-wc36-xgcc-jwpr, inspect your project dependencies for Libp2p core:

inspect dependencies for libp2p-core

Analyze the terminal output to locate any version of Libp2p core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.30.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Libp2p core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Affected versions of this crate did not check that the public key the signature was created with matches the peer ID of the peer record. Any combination was considered valid. This allows an attacker to republish an existing `PeerRecord` with a different `PeerId`.

GHSA-wc36-xgcc-jwpr Affected Libp2p core Versions

1 component(s)
Fixed Versions:
0.30.2
Product / Package Ecosystem Affected Versions Fixed Version
libp2p-core
crates.io
≥ 0.30.0-rc.1
< 0.30.2
0.30.2

References

Frequently Asked Questions

What is GHSA-wc36-xgcc-jwpr?
GHSA-wc36-xgcc-jwpr is a security vulnerability in Libp2p core involving Failure to verify the public key of a `SignedEnvelope` against the `PeerId` in a `PeerRecord` under General Security Weakness.
Which Libp2p core versions are affected?
Affected versions include releases prior to 0.30.2 across affected packages: libp2p-core.
What version fixes GHSA-wc36-xgcc-jwpr?
Upgrading to 0.30.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is libp2p-core affected?
Yes, libp2p-core is affected in releases prior to 0.30.2. Upgrade your dependency to 0.30.2 or later.
What CWE is associated with GHSA-wc36-xgcc-jwpr?
GHSA-wc36-xgcc-jwpr is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-wc36-xgcc-jwpr?
Run the dependency tree command: 'inspect dependencies for libp2p-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wc36-xgcc-jwpr",
  "modified" : "2022-06-17T00:01:02Z",
  "published" : "2022-06-17T00:01:02Z",
  "aliases" : [ ],
  "summary" : "Failure to verify the public key of a `SignedEnvelope` against the `PeerId` in a `PeerRecord`",
  "details" : "Affected versions of this crate did not check that the public key the signature was created with matches the peer ID of the peer record. \nAny combination was considered valid.\n\nThis allows an attacker to republish an existing `PeerRecord` with a different `PeerId`.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "libp2p-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.30.0-rc.1"
      }, {
        "fixed" : "0.30.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "PACKAGE",
    "url" : "https://github.com/libp2p/rust-libp2p"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2022-0009.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T00:01:02Z",
    "nvd_published_at" : null
  }
}