CVE-2020-14968: Jsrsasign RSA-PSS Signature Validation Vulnerability By Vulnerability
CRITICALCVE-2020-14968 is a CRITICAL (CVSS 9.8) rsa-pss signature validation vulnerability by 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-pss signature validation vulnerability by prepending zeros in jsrsasign. Remediation is available by upgrading affected packages to version 8.0.17.
CVE-2020-14968 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-14968
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.17
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-14968, 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.17), 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-14968 Affected Jsrsasign Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsrsasign
|
npm |
≥ 3.0.0
< 8.0.17
|
8.0.17
|
References
Frequently Asked Questions
What is CVE-2020-14968?
Which Jsrsasign versions are affected?
What version fixes CVE-2020-14968?
Is jsrsasign affected?
What is the CVSS score of CVE-2020-14968?
What CWE is associated with CVE-2020-14968?
How can I check npm dependencies for CVE-2020-14968?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q3gh-5r98-j4h3",
"modified" : "2023-01-27T21:41:14Z",
"published" : "2020-06-26T16:26:50Z",
"aliases" : [ "CVE-2020-14968" ],
"summary" : "RSA-PSS signature validation vulnerability by prepending zeros in jsrsasign",
"details" : "### Impact\nJsrsasign can verify RSA-PSS signature which value can expressed as BigInteger. When there is a valid RSA-PSS signature value, this vulnerability is also accept value with prepending zeros as a valid signature.\n\n- If you are not use RSA-PSS signature validation, this vulnerability is not affected. \n- Risk to accept a forged or crafted message to be signed is low.\n- Risk to raise memory corruption is low since jsrsasign uses BigInteger class.\n\n### Patches\nUsers using RSA-PSS signature validation should upgrade to 8.0.17.\n\n### Workarounds\nReject RSA-PSS signatures with unnecessary prepending zeros.\n\n### References\nhttps://github.com/kjur/jsrsasign/security/advisories/GHSA-q3gh-5r98-j4h3\n[https://github.com/kjur/jsrsasign/issues/438](https://github.com/kjur/jsrsasign/issues/438)\nhttps://nvd.nist.gov/vuln/detail/CVE-2020-14968\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14968\nhttps://vuldb.com/?id.157125\nhttps://kjur.github.io/jsrsasign/api/symbols/RSAKey.html#.verifyWithMessageHashPSS\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" : "3.0.0"
}, {
"fixed" : "8.0.17"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 8.0.16"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/security/advisories/GHSA-q3gh-5r98-j4h3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-14968"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/issues/438"
}, {
"type" : "WEB",
"url" : "https://github.com/kjur/jsrsasign/commit/3bcc088c727658d7235854cd2a409a904cc2ce99"
}, {
"type" : "WEB",
"url" : "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14968"
}, {
"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/RSAKey.html#.verifyWithMessageHashPSS"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20200724-0001"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.157125"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1541"
}, {
"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:19:52Z",
"nvd_published_at" : "2020-06-22T12:15:00Z"
}
}