Skip to main content

CVE-2022-24759: CWE-347: Improper Verification of Cryptographic Signature in ChainSafe js-libp2p-noise

Medium
Published: Thu Mar 17 2022 (03/17/2022, 16:40:11 UTC)
Source: CVE
Vendor/Project: ChainSafe
Product: js-libp2p-noise

Description

`@chainsafe/libp2p-noise` contains TypeScript implementation of noise protocol, an encryption protocol used in libp2p. `@chainsafe/libp2p-noise` before 4.1.2 and 5.0.3 does not correctly validate signatures during the handshake process. This may allow a man-in-the-middle to pose as other peers and get those peers banned. Users should upgrade to version 4.1.2 or 5.0.3 to receive a patch. There are currently no known workarounds.

AI-Powered Analysis

AILast updated: 06/23/2025, 13:20:58 UTC

Technical Analysis

CVE-2022-24759 is a vulnerability identified in the ChainSafe project's JavaScript implementation of the Noise Protocol within the @chainsafe/libp2p-noise library. The Noise Protocol is a cryptographic handshake protocol widely used in peer-to-peer (P2P) networking frameworks, including libp2p, which underpins decentralized applications and blockchain networks. This vulnerability arises from improper verification of cryptographic signatures during the handshake process, classified under CWE-347 (Improper Verification of Cryptographic Signature). Specifically, versions of @chainsafe/libp2p-noise prior to 4.1.2 and versions from 5.0.0 up to but not including 5.0.3 fail to correctly validate the authenticity of peer signatures. This flaw can be exploited by a man-in-the-middle (MITM) attacker who can impersonate legitimate peers during the handshake, potentially causing the targeted peers to be banned or disconnected from the network. While the vulnerability does not directly disclose sensitive information or allow arbitrary code execution, it undermines the integrity and trust model of the P2P network by enabling identity spoofing and denial of service against peers. No known exploits have been reported in the wild, and no effective workarounds exist other than upgrading to patched versions 4.1.2 or 5.0.3. The issue affects decentralized applications and services relying on libp2p networking stacks that use the vulnerable versions of js-libp2p-noise, which is common in blockchain nodes, distributed storage systems, and other P2P communication platforms.

Potential Impact

For European organizations, the impact of this vulnerability can be significant in sectors relying on decentralized and P2P technologies, such as blockchain-based financial services, distributed ledger technology (DLT) platforms, and decentralized storage or communication networks. The improper signature verification can allow attackers to impersonate legitimate nodes, leading to network partitioning, denial of service, or disruption of consensus mechanisms in blockchain networks. This can result in degraded service availability, loss of trust in network integrity, and potential financial losses or regulatory compliance issues, especially in critical infrastructure or financial sectors. Furthermore, organizations using libp2p-based solutions for secure communications or data exchange may face increased risk of targeted attacks that exploit this flaw to isolate or ban legitimate peers, impacting operational continuity. Although no direct data breach or code execution is enabled by this vulnerability, the undermining of cryptographic handshake integrity poses a medium-level threat to confidentiality and availability within affected networks.

Mitigation Recommendations

The primary and only effective mitigation is to upgrade the @chainsafe/libp2p-noise library to version 4.1.2 or 5.0.3 or later, where the signature verification flaw has been corrected. Organizations should conduct an inventory of all applications and services using libp2p networking stacks and identify those incorporating vulnerable versions of js-libp2p-noise. Given the lack of workarounds, patch management processes must prioritize this upgrade. Additionally, organizations should implement network monitoring to detect unusual peer banning or disconnection patterns that may indicate exploitation attempts. Employing layered network security controls such as anomaly detection on P2P traffic and strict peer authentication policies can help mitigate the risk of MITM attacks. For blockchain and DLT operators, validating node behavior and consensus integrity post-upgrade is recommended to ensure network stability. Finally, organizations should engage with their software vendors or open-source communities to track further updates or advisories related to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-02-10T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9842c4522896dcbf296e

Added to database: 5/21/2025, 9:09:22 AM

Last enriched: 6/23/2025, 1:20:58 PM

Last updated: 8/6/2025, 6:41:02 PM

Views: 18

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats