VYPR
Critical severityNVD Advisory· Published Apr 7, 2021· Updated Aug 3, 2024

CVE-2021-30246

CVE-2021-30246

Description

In the jsrsasign package through 10.1.13 for Node.js, some invalid RSA PKCS#1 v1.5 signatures are mistakenly recognized to be valid. NOTE: there is no known practical attack.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

jsrsasign package through 10.1.13 for Node.js incorrectly validates invalid RSA PKCS#1 v1.5 signatures due to lenient prefix parsing.

Vulnerability

The jsrsasign package for Node.js (versions up to and including 10.1.13) contains a flaw in its RSA PKCS#1 v1.5 signature verification logic. The RSAKey.prototype.verify function in jsrsasign.js uses an incorrect regex pattern (/^1f+00/) to strip the prefix from the PKCS#1 encoded message, and ignores leading 0x00 bytes when converting the signature to an integer. This leniency causes some invalid signatures to be mistakenly accepted as valid [2].

Exploitation

An attacker would need to craft a specially malformed RSA PKCS#1 v1.5 signature that, due to the flawed parsing, passes verification. According to the advisory, the bug arises because leading 0x00 bytes are ignored during octet-to-integer conversion, and the regex pattern does not properly enforce the required block type byte (0x01) and padding length (at least 8 bytes of 0xFF) [2]. The note indicates no known practical attack exists [1].

Impact

Successful exploitation could lead to acceptance of forged RSA signatures, undermining the integrity of any system relying on jsrsasign for signature verification. This could allow an attacker to bypass authentication or tamper with signed data without possessing the corresponding private key [1][2].

Mitigation

A fixed version has not been explicitly mentioned in the available references; the project maintainers noted in 2026 that the library would reach end-of-support soon [3]. Users should update to a later version if available (e.g., check for releases after 10.1.13) or consider migrating to an alternative cryptographic library. No workaround is provided in the references.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
jsrsasignnpm
< 10.2.010.2.0

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

7

News mentions

0

No linked articles in our index yet.