CVE-2022-24771
JSON

7.5high

Improper Verification of Cryptographic Signature in node-forge

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.72% (higher than 49% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cfm4-qjh2-4765

Description

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 is lenient in checking the digest algorithm structure. This can allow a crafted structure that steals padding bytes and uses unchecked portion of the PKCS#1 encoded message 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.

Affected

Product or packageVersionsReported by
digitalbazaar forge< 1.3.0, before 1.3.0CVE List, NVD
node-forge (npm)before 1.3.0GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:P/A:N

Classification

CWE-347

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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 is lenient in checking the digest algorithm structure. This can allow a crafted structure that steals padding bytes and uses unchecked portion of the PKCS#1 encoded message 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.

GitHub Advisory Database
Impact

RSA PKCS#1 v1.5 signature verification code is lenient in checking the digest algorithm structure. This can allow a crafted structure that steals padding bytes and uses unchecked portion of the PKCS#1 encoded message to forge a signature when a low public exponent is being used.

Patches

The issue has been addressed in node-forge 1.3.0.

References

For more information, please see "Bleichenbacher's RSA signature forgery based on implementation error" by Hal Finney.

For more information

If you have any questions or comments about this advisory:

NVD (es)

Forge (también llamado "node-forge") es una implementación nativa de la seguridad de la capa de transporte en JavaScript. En versiones anteriores a 1.3.0, el código de verificación de firmas RSA PKCS#1 versión v1.5, es indulgente a la hora de comprobar la estructura del algoritmo de resumen. Esto puede permitir una estructura diseñada que roba bytes de relleno y usa la parte no comprobada del mensaje codificado PKCS#1 para falsificar una firma cuando es usado un exponente público bajo. El problema ha sido abordado en "node-forge" versión 1.3.0. Actualmente no se presentan medidas de mitigación conocidas

References

Sources

SourceRecordLicence
CVE ListCVE-2022-24771 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-cfm4-qjh2-4765 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-24771 changed 2026-06-17Public domain