py-libp2p Denial-of-Service Vulnerability via Large RSA Keys

Vulnerability

A denial-of-service vulnerability has been identified in py-libp2p versions prior to 0.2.3. This issue allows a peer to cause resource exhaustion by sending large RSA keys, which the affected node must process during signature verification. The lack of a length limit for RSA keys enables this resource consumption attack.

Impact

Exploitation of this vulnerability leads to resource exhaustion on the affected node, causing it to spend excessive time verifying signatures for large RSA keys.

Reproduction

To reproduce this vulnerability, send a large RSA key to a node running a vulnerable version of py-libp2p. The node will then experience a resource exhaustion attack as it processes the oversized key during signature verification.

Remediation

Users can upgrade to py-libp2p version 0.2.3 or later, where this vulnerability has been addressed by implementing a maximum RSA key size limit of 4096 bits.

Added: Jul 14, 2025, 5:31 AM
Updated: Jul 14, 2025, 5:31 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
8.4
remediation
0.0
relevance
0.3
threat
4.8
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.