Vulnerabilities in pkg:golang/github.com/libp2p/go-libp2p
PACKAGECVE-2023-39533 is a HIGH (CVSS 7.5) libp2p nodes vulnerable to attack vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/libp2p/go libp2p libraries in the Go ecosystem. The issue involves libp2p nodes vulnerable to attack using large rsa keys. Remediation is available by upgrading affected packages to version 0.27.8, 0.28.2, 0.29.1.
pkg:golang/github.com/libp2p/go-libp2p
Vulnerability advisories affecting package pkg:golang/github.com/libp2p/go-libp2p. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-876p-8259-xjgg | CVE-2023-39533 | HIGH | libp2p nodes vulnerable to attack using large RSA keys |
| GHSA-gcq9-qqwx-rgj3 | CVE-2023-40583 | HIGH | libp2p nodes vulnerable to OOM attack |
| GHSA-j7qp-mfxf-8xjw | CVE-2022-23492 | HIGH | libp2p DoS vulnerability from lack of resource management |
CVE-2023-39533 at a Glance
Security Impact
CVSS: 7.5
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:H).
How to Fix CVE-2023-39533
To remediate this vulnerability, upgrade all affected Github.com/libp2p/go libp2p dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/libp2p/go-libp2p to 0.27.8
Upgrade github.com/libp2p/go-libp2p to 0.28.2
Upgrade github.com/libp2p/go-libp2p to 0.29.1
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
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-39533, inspect your project dependencies for Github.com/libp2p/go libp2p:
inspect dependencies for github.com/libp2p/go-libp2p
Analyze the terminal output to locate any version of Github.com/libp2p/go libp2p in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.27.8), 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/libp2p/go libp2p, 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
CVE-2023-39533 Affected Github.com/libp2p/go libp2p Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/libp2p/go-libp2p
|
Go |
< 0.27.8
|
0.27.8
|
|
github.com/libp2p/go-libp2p
|
Go |
≥ 0.28.0
< 0.28.2
|
0.28.2
|
|
github.com/libp2p/go-libp2p
|
Go |
≥ 0.29.0
< 0.29.1
All 1 versions
0.29.0
|
0.29.1
|
References
Frequently Asked Questions
What is CVE-2023-39533?
Which Github.com/libp2p/go libp2p versions are affected?
What version fixes CVE-2023-39533?
Is github.com/libp2p/go-libp2p affected?
What is the CVSS score of CVE-2023-39533?
What CWE is associated with CVE-2023-39533?
How can I check Go dependencies for CVE-2023-39533?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-876p-8259-xjgg",
"modified" : "2026-09-01T21:35:26Z",
"published" : "2023-08-09T13:18:18Z",
"aliases" : [ "CVE-2023-39533" ],
"summary" : "libp2p nodes vulnerable to attack using large RSA keys",
"details" : "### Impact\nA malicious peer can use large RSA keys to run a resource exhaustion attack & force a node to spend time doing signature verification of the large key. This vulnerability is present in the core/crypto module of go-libp2p and can occur during the Noise handshake and the libp2p x509 extension verification step.\nTo prevent this attack, go-libp2p now restricts RSA keys to <= 8192 bits.\n\n### Patches\nUsers should upgrade their go-libp2p versions to >=v0.27.8, >= v0.28.2, or >=v0.29.1\nTo protect your application, it's necessary to update to these patch releases **AND** to use the updated Go compiler (1.20.7 or 1.19.12, respectively)\n\n### Workarounds\nThere are no known workarounds\n\n### References\nThe Golang crypto/tls package also had this vulnerability (\"verifying certificate chains containing large RSA keys is slow” https://github.com/golang/go/issues/61460)\nFix in golang/go crypto/tls: https://github.com/golang/go/commit/2350afd2e8ab054390e284c95d5b089c142db017\nFix in quic-go https://github.com/quic-go/quic-go/pull/4012",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/libp2p/go-libp2p"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.27.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/libp2p/go-libp2p"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.28.0"
}, {
"fixed" : "0.28.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/libp2p/go-libp2p"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.29.0"
}, {
"fixed" : "0.29.1"
} ]
} ],
"versions" : [ "0.29.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/libp2p/go-libp2p/security/advisories/GHSA-876p-8259-xjgg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-39533"
}, {
"type" : "WEB",
"url" : "https://github.com/golang/go/issues/61460"
}, {
"type" : "WEB",
"url" : "https://github.com/libp2p/go-libp2p/pull/2454"
}, {
"type" : "WEB",
"url" : "https://github.com/quic-go/quic-go/pull/4012"
}, {
"type" : "WEB",
"url" : "https://github.com/golang/go/commit/2350afd2e8ab054390e284c95d5b089c142db017"
}, {
"type" : "WEB",
"url" : "https://github.com/libp2p/go-libp2p/commit/0cce607219f3710addc7e18672cffd1f1d912fbb"
}, {
"type" : "WEB",
"url" : "https://github.com/libp2p/go-libp2p/commit/445be526aea4ee0b1fa5388aa65d32b2816d3a00"
}, {
"type" : "WEB",
"url" : "https://github.com/libp2p/go-libp2p/commit/e30fcf7dfd4715ed89a5e68d7a4f774d3b9aa92d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/libp2p/go-libp2p"
}, {
"type" : "WEB",
"url" : "https://go.dev/issue/61460"
}, {
"type" : "WEB",
"url" : "https://nrdax.com/techniques/NRDAX-T0205-pre-handshake-crypto-cpu-burn"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-09T13:18:18Z",
"nvd_published_at" : "2023-08-08T19:15:10Z"
}
}