CVE-2020-14967: Jsrsasign RSA PKCS#1 Decryption Vulnerability With Vulnerability
CRITICALCVE-2020-14967 is a CRITICAL (CVSS 9.8) rsa pkcs#1 decryption vulnerability with vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Jsrsasign libraries in the npm ecosystem. The issue involves rsa pkcs#1 decryption vulnerability with prepending zeros in jsrsasign. Remediation is available by upgrading affected packages to version 8.0.18.
CVE-2020-14967 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-14967
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@8.0.18
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 CVE-2020-14967, 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 8.0.18), 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program 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
CVE-2020-14967 Affected Jsrsasign Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsrsasign
|
npm |
< 8.0.18
|
8.0.18
|
References
Frequently Asked Questions
What is CVE-2020-14967?
Which Jsrsasign versions are affected?
What version fixes CVE-2020-14967?
Is jsrsasign affected?
What is the CVSS score of CVE-2020-14967?
What CWE is associated with CVE-2020-14967?
How can I check npm dependencies for CVE-2020-14967?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xxxq-chmp-67g4",
"modified" : "2023-01-31T01:29:40Z",
"published" : "2020-06-26T16:27:08Z",
"aliases" : [ "CVE-2020-14967" ],
"summary" : "RSA PKCS#1 decryption vulnerability with prepending zeros in jsrsasign",
"details" : "### Impact\nJsrsasign supports RSA PKCS#1 v1.5 (i.e. RSAES-PKCS1-v1_5) and RSA-OAEP encryption and decryption. Its encrypted message is represented as BigInteger. When there is a valid encrypted message, a crafted message with prepending zeros can be decrypted by this vulnerability.\n\n- If you don't use RSA PKCS1-v1_5 or RSA-OAEP decryption, this vulnerability is not affected.\n- Risk to forge contents of encrypted message is very low.\n- Risk to raise memory corruption is low since jsrsasign uses BigInteger class.\n\n### Patches\nUsers using RSA PKCS1-v1_5 or RSA-OAEP decryption should upgrade to 8.0.18.\n\n### Workarounds\nReject RSA PKCS1-v1_5 or RSA-OAEP encrypted message with unnecessary prepending zeros.\n\n### References\nhttps://nvd.nist.gov/vuln/detail/CVE-2020-14967\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14967\nhttps://vuldb.com/?id.157124\nhttps://kjur.github.io/jsrsasign/api/symbols/KJUR.crypto.Cipher.html#.decrypt\nhttps://github.com/kjur/jsrsasign/issues/439\n\n\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsrsasign"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.0.18"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/security/advisories/GHSA-xxxq-chmp-67g4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-14967"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/issues/439"
}, {
"type" : "WEB",
"url" : "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14967"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kjur/jsrsasign"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/releases/tag/8.0.17"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/releases/tag/8.0.18"
}, {
"type" : "WEB",
"url" : "https://kjur.github.io/jsrsasign"
}, {
"type" : "WEB",
"url" : "https://kjur.github.io/jsrsasign/api/symbols/KJUR.crypto.Cipher.html#.decrypt"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20200724-0001"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.157124"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/jsrsasign"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-26T16:26:32Z",
"nvd_published_at" : "2020-06-22T12:15:00Z"
}
}