Vulnerabilities in pkg:golang/github.com/ipfs/kubo

PACKAGE
Advisory Summary

GHSA-qvqg-6rp8-4p9h is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/ipfs/kubo libraries in the Go ecosystem. The issue involves github.com/ipfs/kubo affected by dos bitswap unbounded persistent memory leak. Remediation is available by upgrading affected packages to version 0.19.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/ipfs/kubo

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/ipfs/kubo. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-qvqg-6rp8-4p9h - MODERATE github.com/ipfs/kubo affected by DOS Bitswap unbounded persistent memory leak

GHSA-qvqg-6rp8-4p9h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-qvqg-6rp8-4p9h
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/ipfs/kubo
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:N/I:N/A:L).

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 None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix GHSA-qvqg-6rp8-4p9h

To remediate this vulnerability, upgrade all affected Github.com/ipfs/kubo 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/ipfs/kubo fixed: 0.19.0
Upgrade github.com/ipfs/kubo to 0.19.0
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/ipfs/kubo

How to Check if You Are Affected

To determine whether your application is affected by GHSA-qvqg-6rp8-4p9h, inspect your project dependencies for Github.com/ipfs/kubo:

inspect dependencies for github.com/ipfs/kubo

Analyze the terminal output to locate any version of Github.com/ipfs/kubo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.19.0), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/ipfs/kubo, 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

### Impact An attacker is able allocate arbitrarily many bytes in the Bitswap server by sending many `WANT_BLOCK` and or `WANT_HAVE` requests which are queued in an unbounded queue, with allocations that persist even if the connection is closed. This affects users accepting or connecting untrusted connections such as by running in the public swarm and no pnet config. Nodes that are not publicly reachable but connects to untrusted nodes are also vulnerable to the untrusted nodes being connected to since libp2p connections are blindly bidirectional. ### Patches - 19feb15833c6f4d6e7f1e1b132efaae96d76481d [`boxo`](https://github.com/ipfs/boxo) update in Kubo - GHSA-m974-xj4j-7qv5 patches in boxo ### Workarounds Use [PNET](https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#private-networks), [swarm filters](https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmaddrfilters) or [resource manager allows list](https://pkg.go.dev/github.com/libp2p/go-libp2p/p2p/host/resource-manager#readme-allowlisting-multiaddrs-to-mitigate-eclipse-attacks) to block untrusted connections. Note that using the resource manager will disrupt both client and server features because the bitswap protocol is a message based protocol mixing requests and responses. ### References - GHSA-m974-xj4j-7qv5 - [CVE-2023-25568](https://nvd.nist.gov/vuln/detail/CVE-2023-25568)

GHSA-qvqg-6rp8-4p9h Affected Github.com/ipfs/kubo Versions

1 component(s)
Fixed Versions:
0.19.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/ipfs/kubo
Go
< 0.19.0
0.19.0

References

Frequently Asked Questions

What is GHSA-qvqg-6rp8-4p9h?
GHSA-qvqg-6rp8-4p9h is a security vulnerability in Github.com/ipfs/kubo involving github.com/ipfs/kubo affected by DOS Bitswap unbounded persistent memory leak under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/ipfs/kubo versions are affected?
Affected versions include releases prior to 0.19.0 across affected packages: github.com/ipfs/kubo.
What version fixes GHSA-qvqg-6rp8-4p9h?
Upgrading to 0.19.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/ipfs/kubo affected?
Yes, github.com/ipfs/kubo is affected in releases prior to 0.19.0. Upgrade your dependency to 0.19.0 or later.
What is the CVSS score of GHSA-qvqg-6rp8-4p9h?
GHSA-qvqg-6rp8-4p9h 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:N/I:N/A:L.
What CWE is associated with GHSA-qvqg-6rp8-4p9h?
GHSA-qvqg-6rp8-4p9h is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for GHSA-qvqg-6rp8-4p9h?
Run the dependency tree command: 'inspect dependencies for github.com/ipfs/kubo'. 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-qvqg-6rp8-4p9h",
  "modified" : "2023-05-11T20:40:16Z",
  "published" : "2023-05-11T20:40:16Z",
  "aliases" : [ ],
  "summary" : "github.com/ipfs/kubo affected by DOS Bitswap unbounded persistent memory leak",
  "details" : "### Impact\nAn attacker is able allocate arbitrarily many bytes in the Bitswap server by sending many `WANT_BLOCK` and or `WANT_HAVE` requests which are queued in an unbounded queue, with allocations that persist even if the connection is closed.\n\nThis affects users accepting or connecting untrusted connections such as by running in the public swarm and no pnet config.\nNodes that are not publicly reachable but connects to untrusted nodes are also vulnerable to the untrusted nodes being connected to since libp2p connections are blindly bidirectional.\n\n### Patches\n- 19feb15833c6f4d6e7f1e1b132efaae96d76481d [`boxo`](https://github.com/ipfs/boxo) update in Kubo\n- GHSA-m974-xj4j-7qv5 patches in boxo\n\n### Workarounds\n\nUse [PNET](https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#private-networks), [swarm filters](https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmaddrfilters) or [resource manager allows list](https://pkg.go.dev/github.com/libp2p/go-libp2p/p2p/host/resource-manager#readme-allowlisting-multiaddrs-to-mitigate-eclipse-attacks) to block untrusted connections.\n\nNote that using the resource manager will disrupt both client and server features because the bitswap protocol is a message based protocol mixing requests and responses.\n\n### References\n- GHSA-m974-xj4j-7qv5\n- [CVE-2023-25568](https://nvd.nist.gov/vuln/detail/CVE-2023-25568)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/ipfs/kubo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ipfs/kubo/security/advisories/GHSA-qvqg-6rp8-4p9h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25568"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ipfs/kubo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-11T20:40:16Z",
    "nvd_published_at" : null
  }
}