{"id":"CVE-2021-29443","published":"2021-04-16T17:35:12Z","modified":"2024-08-03T22:02:52Z","title":"Padding Oracle Attack due to Observable Timing Discrepancy in jose","vendor":"panva","product":"jose","tier":"tail","description":{"text":"jose is an npm library providing a number of cryptographic operations. In vulnerable versions AES_CBC_HMAC_SHA2 Algorithm (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) decryption would always execute both HMAC tag verification and CBC decryption, if either failed `JWEDecryptionFailed` would be thrown. 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). All major release versions have had a patch released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are `^1.28.1 || ^2.0.5 || >=3.11.4`. Users should upgrade their v1.x dependency to ^1.28.1, their v2.x dependency to ^2.0.5, and their v3.x dependency to ^3.11.4. Thanks to Jason from Microsoft Vulnerability Research (MSVR) for bringing this up and Eva Sarafianou (@esarafianou) for helping to score this advisory.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01167,"percentile":0.68116,"provenance":"source"},"cwes":[{"id":"CWE-203","name":"Observable Discrepancy"}],"references":[{"url":"https://github.com/panva/jose/security/advisories/GHSA-58f5-hfqc-jgch","tags":["x_refsource_CONFIRM"]},{"url":"https://www.npmjs.com/package/jose","tags":["x_refsource_MISC"]}],"priority":{"score":17.8,"factors":[{"name":"EPSS percentile","points":13.62},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"panva","affectedVersions":[{"vendor":"panva","product":"jose","versions":["< 1.28.1",">= 2.0.0, < 2.0.5",">= 3.0.0, < 3.11.4"]}],"affected":[{"ecosystem":"npm","package":"jose","vulnerableRanges":[">=1.0.0, <1.28.1",">=2.0.0, <2.0.5",">=3.0.0, <3.11.4"],"patched":["1.28.1","2.0.5","3.11.4"],"from":["GHSA-58f5-hfqc-jgch"],"provenance":"source"}],"summary":{"text":"The jose npm library, in versions prior to 1.28.1, 2.0.5 and 3.11.4, has an AES_CBC_HMAC_SHA2 decryption flaw (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) in which CBC decryption runs even when HMAC tag verification fails, producing an observable timing difference that acts as a padding oracle. An unauthenticated remote attacker able to submit ciphertexts for decryption, with high attack complexity, could exploit that timing signal to recover plaintext without the decryption key using on average 128 × b calls per block, where b is the block size in bytes.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:47:36Z"},"euvd":{"id":"EUVD-2021-0764","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-29443","published":"2021-04-16","fixed":"3.11.4","kev":false},{"cve":"CVE-2022-36083","published":"2022-09-07","fixed":"4.9.2","kev":false,"link":{"from":"CVE-2021-29443","to":"CVE-2022-36083","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:jose","fromFixed":"1.28.1","toFixed":"1.28.2","daysApart":509},{"kind":"version-step","provenance":"source","package":"npm:jose","fromFixed":"2.0.5","toFixed":"2.0.6","daysApart":509}]}},{"cve":"CVE-2024-28176","published":"2024-03-09","fixed":"4.15.5","kev":false}],"package":"npm:jose"}}