Vulnerabilities in pkg:npm/simple-crypto-js

PACKAGE
Advisory Summary

GHSA-5v7r-jg9r-vq44 is a MODERATE (CVSS 5.9) insecure cryptography algorithm vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Simple crypto js libraries in the npm ecosystem. The issue involves insecure cryptography algorithm in simple-crypto-js. Remediation is available by upgrading affected packages to version 2.3.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/simple-crypto-js

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/simple-crypto-js. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-5v7r-jg9r-vq44 - MODERATE Insecure Cryptography Algorithm in simple-crypto-js

GHSA-5v7r-jg9r-vq44 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-5v7r-jg9r-vq44
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Simple crypto js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-5v7r-jg9r-vq44

To remediate this vulnerability, upgrade all affected Simple crypto js dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

simple-crypto-js fixed: 2.3.0
npm install simple-crypto-js@2.3.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 simple-crypto-js

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-5v7r-jg9r-vq44, inspect your project dependencies using npm:

npm ls simple-crypto-js

Analyze the terminal output to locate any version of Simple crypto js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.

Note: The npm ls simple-crypto-js 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Simple crypto js, 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

Versions of `simple-crypto-js` prior to 2.3.0 use AES-CBC with PKCS#7 padding, which is vulnerable to padding oracle attacks. This may allow attackers to break the encryption and access sensitive data. ## Recommendation Upgrade to version 2.3.0 or later.

GHSA-5v7r-jg9r-vq44 Affected Simple crypto js Versions

1 component(s)
Fixed Versions:
2.3.0
Product / Package Ecosystem Affected Versions Fixed Version
simple-crypto-js
npm
< 2.3.0
2.3.0

References

Frequently Asked Questions

What is GHSA-5v7r-jg9r-vq44?
GHSA-5v7r-jg9r-vq44 is a security vulnerability in Simple crypto js involving Insecure Cryptography Algorithm in simple-crypto-js under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Simple crypto js versions are affected?
Affected versions include releases prior to 2.3.0 across affected packages: simple-crypto-js.
What version fixes GHSA-5v7r-jg9r-vq44?
Upgrading to 2.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is simple-crypto-js affected?
Yes, simple-crypto-js is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
What is the CVSS score of GHSA-5v7r-jg9r-vq44?
GHSA-5v7r-jg9r-vq44 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-5v7r-jg9r-vq44?
GHSA-5v7r-jg9r-vq44 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check npm dependencies for GHSA-5v7r-jg9r-vq44?
Run the dependency tree command: 'npm ls simple-crypto-js'. 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-5v7r-jg9r-vq44",
  "modified" : "2021-09-29T20:08:01Z",
  "published" : "2020-09-03T21:19:46Z",
  "aliases" : [ ],
  "summary" : "Insecure Cryptography Algorithm in simple-crypto-js",
  "details" : "Versions of `simple-crypto-js` prior to 2.3.0 use AES-CBC with PKCS#7 padding, which is vulnerable to padding oracle attacks. This may allow attackers to break the encryption and access sensitive data.\n\n\n## Recommendation\n\nUpgrade to version 2.3.0 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "simple-crypto-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/danang-id/simple-crypto-js/issues/12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danang-id/simple-crypto-js/pull/17"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danang-id/simple-crypto-js/commit/416584369de1dad9b21ac3fe85df0b71cf5718b2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/danang-id/simple-crypto-js"
  }, {
    "type" : "WEB",
    "url" : "https://robertheaton.com/2013/07/29/padding-oracle-attack"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-SIMPLECRYPTOJS-544027"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:51:22Z",
    "nvd_published_at" : null
  }
}