GHSA-h87q-g2wp-47pj: Jsrsasign Signatures Are Mistakenly Recognized To Vulnerability
MODERATEGHSA-h87q-g2wp-47pj is a MODERATE signatures are mistakenly recognized to vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Jsrsasign libraries in the npm ecosystem. The issue involves signatures are mistakenly recognized to be valid in jsrsasign. Remediation is available by upgrading affected packages to version 10.2.0.
GHSA-h87q-g2wp-47pj at a Glance
How to Fix GHSA-h87q-g2wp-47pj
To remediate this vulnerability, upgrade all affected Jsrsasign dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jsrsasign@10.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsrsasign
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-h87q-g2wp-47pj, inspect your project dependencies using npm:
npm ls jsrsasign
Analyze the terminal output to locate any version of Jsrsasign in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.2.0), your application is affected.
Note: The npm ls jsrsasign command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Jsrsasign, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-h87q-g2wp-47pj Affected Jsrsasign Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsrsasign
|
npm |
< 10.2.0
|
10.2.0
|
References
Frequently Asked Questions
What is GHSA-h87q-g2wp-47pj?
Which Jsrsasign versions are affected?
What version fixes GHSA-h87q-g2wp-47pj?
Is jsrsasign affected?
What CWE is associated with GHSA-h87q-g2wp-47pj?
How can I check npm dependencies for GHSA-h87q-g2wp-47pj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h87q-g2wp-47pj",
"modified" : "2022-02-15T01:51:57Z",
"published" : "2022-02-09T22:41:19Z",
"aliases" : [ ],
"summary" : "Signatures are mistakenly recognized to be valid in jsrsasign",
"details" : "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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsrsasign"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-30246"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/issues/478"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/releases/tag/10.1.13"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/releases/tag/10.2.0"
}, {
"type" : "WEB",
"url" : "https://kjur.github.io/jsrsasign"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-08T20:09:58Z",
"nvd_published_at" : null
}
}