CVE-2022-24772 in Forgeinfo

Summary

by MITRE • 03/18/2022

Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.3.0, RSA PKCS#1 v1.5 signature verification code does not check for tailing garbage bytes after decoding a `DigestInfo` ASN.1 structure. This can allow padding bytes to be removed and garbage data added to forge a signature when a low public exponent is being used. The issue has been addressed in `node-forge` version 1.3.0. There are currently no known workarounds.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/16/2025

The vulnerability described in CVE-2022-24772 affects the node-forge library, a widely-used JavaScript implementation of Transport Layer Security protocols. This library serves as a critical component in many web applications and security tools that require cryptographic operations, particularly those involving RSA signatures and certificate handling. The flaw resides in the RSA PKCS#1 v1.5 signature verification process, which is fundamental to ensuring the integrity and authenticity of digital signatures in secure communications. The vulnerability specifically impacts versions prior to 1.3.0, making it a significant concern for developers who have not yet updated their dependencies.

The technical root cause of this vulnerability lies in the insufficient validation of the DigestInfo ASN.1 structure during RSA signature verification. In proper PKCS#1 v1.5 signature verification, the DigestInfo structure should be strictly validated to ensure that no additional data exists beyond the expected signature components. The flaw allows for trailing garbage bytes to be present after decoding the DigestInfo structure without proper validation. When a low public exponent is used, this weakness becomes exploitable as the mathematical properties of low exponents can be manipulated to accept forged signatures that would otherwise be rejected by proper validation. This represents a classic example of improper input validation and inadequate cryptographic implementation that violates the fundamental security principles of signature verification.

The operational impact of this vulnerability extends beyond simple cryptographic weakness, as it can potentially allow attackers to forge valid signatures for digital certificates and other security-critical elements. This could enable man-in-the-middle attacks, certificate impersonation, and other security breaches that compromise the integrity of secure communications. The vulnerability affects any system using node-forge for RSA signature verification, particularly those relying on low public exponent configurations. The lack of known workarounds makes this vulnerability particularly dangerous, as organizations cannot implement temporary fixes while waiting for the official patch. This type of vulnerability falls under CWE-20, Improper Input Validation, and aligns with ATT&CK technique T1552.004, Credentials in Files, when considering the potential for signature forgery to compromise authentication mechanisms.

Organizations and developers must immediately update to node-forge version 1.3.0 or later to address this vulnerability. The patch implements proper validation of the DigestInfo structure to ensure that no trailing garbage bytes are accepted during signature verification. Security teams should conduct comprehensive audits of their systems to identify all instances where node-forge is used, particularly in certificate validation and signature verification processes. This vulnerability demonstrates the critical importance of proper cryptographic implementation and the potential consequences of inadequate validation in security-critical code. The remediation process should include not only updating the library but also verifying that all signature verification processes are properly validated against the patched version to ensure complete protection against this specific attack vector.

Responsible

GitHub, Inc.

Reservation

02/10/2022

Disclosure

03/18/2022

Moderation

accepted

CPE

ready

EPSS

0.01015

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!