{"id":"CVE-2021-29443","aliases":["CVE-2021-29443","GHSA-58f5-hfqc-jgch"],"related":[],"kind":"vulnerability","state":"published","title":"Padding Oracle Attack due to Observable Timing Discrepancy in jose","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"jose is an npm library providing a number of cryptographic operations.\n### 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\nAll 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`.\n\nUsers should upgrade their v1.x dependency to [`^1.28.1`](https://github.com/panva/jose/releases/tag/v1.28.1), their v2.x dependency to [`^2.0.5`](https://github.com/panva/jose/releases/tag/v2.0.5), and their v3.x dependency to [`^3.11.4`](https://github.com/panva/jose/releases/tag/v3.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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"jose es una biblioteca npm que proporciona una serie de operaciones criptográficas.&#xa0;En versiones vulnerables el algoritmo AES_CBC_HMAC_SHA2 (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512), el descifrado siempre ejecutaba tanto la verificación de etiquetas HMAC como el descifrado CBC, si cualquiera de los dos presentaba un fallo, \"JWEDecryptionFailed\" sería lanzado.&#xa0;Una posible diferencia observable en el tiempo cuando un error de padding podría ocurrir al descifrar el texto cifrado crea un padding oracle y un adversario podría ser capaz de hacer uso de ese oracle para descifrar datos sin conocer la clave de descifrado al emitir un promedio de 128*b llamadas padding oracle (donde b es el número de bytes en el bloque de texto cifrado).&#xa0;Todas las versiones de lanzamiento principales han recibido un parche que garantiza que la etiqueta HMAC se verifique antes de llevar a cabo el descifrado CBC.&#xa0;Las versiones fijas son ^1.28.1 || ^2.0.5 || superiores o iguales a 3.11.4.&#xa0;Los usuarios deben actualizar su dependencia versiones v1.x hasta ^1.28.1, su dependencia versiones v2.x hasta ^ 2.0.5 y su dependencia versiones v3.x hasta ^3.11.4.&#xa0;Gracias a Jason de Microsoft Vulnerability Research (MSVR) por mencionar este tema y a Eva Sarafianou (@esarafianou) por ayudar a calificar este aviso","source":"nvd"}],"published":"2021-04-16T17:35:12.000Z","modified":"2026-07-08T06:27:54.450Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-203","CWE-696"],"affected":[{"ranges":[{"version":"< 1.28.1","status":"affected"},{"version":">= 2.0.0, < 2.0.5","status":"affected"},{"version":">= 3.0.0, < 3.11.4","status":"affected"}],"vendor":"panva","product":"jose","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.28.1"}],"ecosystem":"npm","package":"jose","purl":"pkg:npm/jose","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.0.5"}],"ecosystem":"npm","package":"jose","purl":"pkg:npm/jose","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.11.4"}],"ecosystem":"npm","package":"jose","purl":"pkg:npm/jose","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.0.0","fixed":"1.28.1"},{"status":"affected","introduced":"2.0.0","fixed":"2.0.5"},{"status":"affected","introduced":"3.0.0","fixed":"3.11.4"}],"vendor":"panva","product":"jose","cpe":"cpe:2.3:a:panva:jose:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/panva/jose/security/advisories/GHSA-58f5-hfqc-jgch","tags":["patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/jose","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29443","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29443","url":"https://www.cve.org/CVERecord?id=CVE-2021-29443","licence":"CVE Terms of Use","modified":"2024-08-03T22:02:52.017Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-58f5-hfqc-jgch","url":"https://github.com/advisories/GHSA-58f5-hfqc-jgch","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:54.450Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29443","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29443","licence":"Public domain","modified":"2026-06-22T03:10:06.180Z"}],"updatedAt":"2026-11-25T22:58:00.845Z","epss":{"score":0.01167,"percentile":0.68246,"date":"2026-12-01T12:00:22.000Z"}}