CVE-2021-29445: Jose node esm runtime Padding Oracle Attack Due To Vulnerability
MODERATECVE-2021-29445 is a MODERATE (CVSS 5.9) padding oracle attack due to vulnerability (CWE-203: Observable Discrepancy) affecting Jose node esm runtime libraries in the npm ecosystem. The issue involves padding oracle attack due to observable timing discrepancy in jose-node-esm-runtime. Remediation is available by upgrading affected packages to version 3.11.4.
CVE-2021-29445 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 CVE-2021-29445
To remediate this vulnerability, upgrade all affected Jose node esm runtime 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 jose-node-esm-runtime@3.11.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jose-node-esm-runtime
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-29445, inspect your project dependencies using npm:
npm ls jose-node-esm-runtime
Analyze the terminal output to locate any version of Jose node esm runtime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.4), your application is affected.
Note: The npm ls jose-node-esm-runtime 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-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Jose node esm runtime, 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-2021-29445 Affected Jose node esm runtime Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jose-node-esm-runtime
|
npm |
< 3.11.4
|
3.11.4
|
References
Frequently Asked Questions
What is CVE-2021-29445?
Which Jose node esm runtime versions are affected?
What version fixes CVE-2021-29445?
Is jose-node-esm-runtime affected?
What is the CVSS score of CVE-2021-29445?
What CWE is associated with CVE-2021-29445?
How can I check npm dependencies for CVE-2021-29445?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4v4g-726h-xvfv",
"modified" : "2023-03-17T17:49:46Z",
"published" : "2021-04-19T14:59:06Z",
"aliases" : [ "CVE-2021-29445" ],
"summary" : "Padding Oracle Attack due to Observable Timing Discrepancy in jose-node-esm-runtime",
"details" : "### Impact\n\n[AES_CBC_HMAC_SHA2 Algorithm](https://tools.ietf.org/html/rfc7518#section-5.2) (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) decryption would always execute both HMAC tag verification and CBC decryption, if either failed `JWEDecryptionFailed` would be thrown. But a possibly observable difference in timing when padding error would occur while decrypting the ciphertext makes a padding oracle and an adversary might be able to make use of that oracle to decrypt data without knowing the decryption key by issuing on average 128*b calls to the padding oracle (where b is the number of bytes in the ciphertext block).\n\n### Patches\n\nA patch was released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are `>=3.11.4`.\n\nUsers should upgrade to `^3.11.4`.\n\n### Credits\nThanks to Morgan Brown of Microsoft for bringing this up and Eva Sarafianou (@esarafianou) for helping to score this advisory.",
"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" : "jose-node-esm-runtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.11.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/panva/jose/security/advisories/GHSA-4v4g-726h-xvfv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29445"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/panva/jose"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/jose-node-esm-runtime"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-203", "CWE-208", "CWE-696" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-16T23:00:41Z",
"nvd_published_at" : "2021-04-16T22:15:00Z"
}
}