Vulnerabilities in pkg:golang/github.com/libp2p/go-libp2p-kad-dht

PACKAGE
Advisory Identifier: GHSA-mqr9-hjr8-2m9w
Advisory Summary

CVE-2023-26248 is a MODERATE (CVSS 5.3) content censorship vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Github.com/libp2p/go libp2p kad dht libraries in the Go ecosystem. The issue involves content censorship in the interplanetary file system (ipfs) via kademlia dht abuse. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/libp2p/go-libp2p-kad-dht

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/libp2p/go-libp2p-kad-dht. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mqr9-hjr8-2m9w CVE-2023-26248 MODERATE Content Censorship in the InterPlanetary File System (IPFS) via Kademlia DHT abuse

CVE-2023-26248 at a Glance

CVE Identifier CVE-2023-26248
GHSA Identifier GHSA-mqr9-hjr8-2m9w
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Github.com/libp2p/go libp2p kad dht
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-26248

To remediate this vulnerability, upgrade all affected Github.com/libp2p/go libp2p kad dht dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/libp2p/go-libp2p-kad-dht fixed: Latest secure release
Upgrade github.com/libp2p/go-libp2p-kad-dht to Latest secure release
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 github.com/libp2p/go-libp2p-kad-dht

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-26248, inspect your project dependencies for Github.com/libp2p/go libp2p kad dht:

inspect dependencies for github.com/libp2p/go-libp2p-kad-dht

Analyze the terminal output to locate any version of Github.com/libp2p/go libp2p kad dht in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Github.com/libp2p/go libp2p kad dht, 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

The Kademlia DHT (go-libp2p-kad-dht 0.20.0 and earlier) used in IPFS (0.18.1 and earlier) assigns routing information for content (i.e., information about who holds the content) to be stored by peers whose peer IDs have a small DHT distance from the content ID. This allows an attacker to censor content by generating many Sybil peers whose peer IDs have a small distance from the content ID, thus hijacking the content resolution process.

CVE-2023-26248 Affected Github.com/libp2p/go libp2p kad dht Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/libp2p/go-libp2p-kad-dht
Go
≤ 0.20.0

References

Frequently Asked Questions

What is CVE-2023-26248?
CVE-2023-26248 is a security vulnerability in Github.com/libp2p/go libp2p kad dht involving Content Censorship in the InterPlanetary File System (IPFS) via Kademlia DHT abuse under CWE-352: Cross-Site Request Forgery (CSRF).
Which Github.com/libp2p/go libp2p kad dht versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/libp2p/go-libp2p-kad-dht.
What version fixes CVE-2023-26248?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/libp2p/go-libp2p-kad-dht affected?
Yes, github.com/libp2p/go-libp2p-kad-dht is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-26248?
CVE-2023-26248 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2023-26248?
CVE-2023-26248 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check Go dependencies for CVE-2023-26248?
Run the dependency tree command: 'inspect dependencies for github.com/libp2p/go-libp2p-kad-dht'. 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-mqr9-hjr8-2m9w",
  "modified" : "2024-12-12T18:00:00Z",
  "published" : "2024-10-25T18:30:49Z",
  "aliases" : [ "CVE-2023-26248" ],
  "summary" : "Content Censorship in the InterPlanetary File System (IPFS) via Kademlia DHT abuse",
  "details" : "The Kademlia DHT (go-libp2p-kad-dht 0.20.0 and earlier) used in IPFS (0.18.1 and earlier) assigns routing information for content (i.e., information about who holds the content) to be stored by peers whose peer IDs have a small DHT distance from the content ID. This allows an attacker to censor content by generating many Sybil peers whose peer IDs have a small distance from the content ID, thus hijacking the content resolution process.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/libp2p/go-libp2p-kad-dht"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.20.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26248"
  }, {
    "type" : "WEB",
    "url" : "https://arxiv.org/abs/2307.12212"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/libp2p/go-libp2p-kad-dht"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3218"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-25T19:59:06Z",
    "nvd_published_at" : "2024-10-25T16:15:09Z"
  }
}