GHSA-h87q-g2wp-47pj: Jsrsasign Signatures Are Mistakenly Recognized To Vulnerability

MODERATE
CWE-347
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-h87q-g2wp-47pj
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Jsrsasign
Package Ecosystem npm
Published Date
Last Updated

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.

jsrsasign fixed: 10.2.0
npm install jsrsasign@10.2.0
Verify Direct and Transitive Dependencies

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

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.

GHSA-h87q-g2wp-47pj Affected Jsrsasign Versions

1 component(s)
Fixed Versions:
10.2.0
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?
GHSA-h87q-g2wp-47pj is a security vulnerability in Jsrsasign involving Signatures are mistakenly recognized to be valid in jsrsasign under CWE-347: Improper Verification of Cryptographic Signature.
Which Jsrsasign versions are affected?
Affected versions include releases prior to 10.2.0 across affected packages: jsrsasign.
What version fixes GHSA-h87q-g2wp-47pj?
Upgrading to 10.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jsrsasign affected?
Yes, jsrsasign is affected in releases prior to 10.2.0. Upgrade your dependency to 10.2.0 or later.
What CWE is associated with GHSA-h87q-g2wp-47pj?
GHSA-h87q-g2wp-47pj is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check npm dependencies for GHSA-h87q-g2wp-47pj?
Run the dependency tree command: 'npm ls jsrsasign'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}