CVE-2022-24773: Improper Verification of Cryptographic Signature in `node-forge`
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.19147%
CWE
Published
3/18/2022
Updated
1/27/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
node-forge | npm | < 1.3.0 | 1.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key issues: 1) Incomplete validation of DigestInfo's ASN.1 structure in RSA verification, and 2) Lenient DER parsing that allowed unprocessed bytes. The verify()
function in rsa.js
directly used asn1.fromDer
without structural validation of DigestInfo, while asn1.fromDer
's previous behavior allowed trailing bytes. The commit introduced digestInfoValidator
and strict byte parsing to address these, confirming these functions were vulnerable pre-patch.