GHSA-5v7r-jg9r-vq44: Simple crypto js Insecure Cryptography Algorithm Vulnerability
MODERATEGHSA-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.
GHSA-5v7r-jg9r-vq44 at a Glance
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).
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.
npm install simple-crypto-js@2.3.0
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
GHSA-5v7r-jg9r-vq44 Affected Simple crypto js Versions
1 component(s)| 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?
Which Simple crypto js versions are affected?
What version fixes GHSA-5v7r-jg9r-vq44?
Is simple-crypto-js affected?
What is the CVSS score of GHSA-5v7r-jg9r-vq44?
What CWE is associated with GHSA-5v7r-jg9r-vq44?
How can I check npm dependencies for GHSA-5v7r-jg9r-vq44?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}