{"id":"CVE-2021-29446","aliases":["CVE-2021-29446","GHSA-rvcw-f68w-8h8h"],"related":[],"kind":"vulnerability","state":"published","title":"Padding Oracle Attack due to Observable Timing Discrepancy in jose-node-cjs-runtime","summary":"jose-node-cjs-runtime is an npm package which provides a number of cryptographic functions. In versions prior to 3.11.4 the 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. 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). A patch was released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are `>=3.11.4`. Users should upgrade to `^3.11.4`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"jose-node-cjs-runtime is an npm package which provides a number of cryptographic functions. In versions prior to 3.11.4 the 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. 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). A patch was released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are `>=3.11.4`. Users should upgrade to `^3.11.4`.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"jose-node-cjs-runtime es un paquete npm que proporciona una serie de funciones criptográficas.&#xa0;En versiones anteriores a 3.11.4, el descifrado del algoritmo AES_CBC_HMAC_SHA2 (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) siempre ejecutaba tanto la comprobación de etiquetas HMAC como el descifrado CBC, si se presentaba un fallo \"JWEDecryptionFailed\" sería lanzado.&#xa0;Pero una posible diferencia observable en el tiempo cuando se produciría un error de padding al descifrar el texto cifrado crea un padding oracle y un adversario podría hacer uso de ese oracle para descifrar datos sin conocer la clave de descifrado emitiendo un promedio de 128*b llamadas al padding oracle (donde b es el número de bytes en el bloque de texto cifrado).&#xa0;Se lanzó un parche que garantiza que la etiqueta HMAC es comprobada antes de llevar a cabo el descifrado CBC.&#xa0;Las versiones corregidas son \"superiores o iguales a 3.11.4\".&#xa0;Los usuarios deben actualizar a \"^3.11.4\"","source":"nvd"}],"published":"2021-04-16T22:00:15.000Z","modified":"2026-07-08T06:01:00.776Z","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-208","CWE-696"],"affected":[{"ranges":[{"version":"< 3.11.4","status":"affected"}],"vendor":"panva","product":"jose-node-cjs-runtime","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.11.4"}],"ecosystem":"npm","package":"jose-node-cjs-runtime","purl":"pkg:npm/jose-node-cjs-runtime","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.11.4"}],"vendor":"jose-node-cjs-runtime_project","product":"jose-node-cjs-runtime","cpe":"cpe:2.3:a:jose-node-cjs-runtime_project:jose-node-cjs-runtime:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/panva/jose/security/advisories/GHSA-rvcw-f68w-8h8h","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/jose-node-cjs-runtime","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29446","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/panva/jose","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29446","url":"https://www.cve.org/CVERecord?id=CVE-2021-29446","licence":"CVE Terms of Use","modified":"2024-08-03T22:02:51.986Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rvcw-f68w-8h8h","url":"https://github.com/advisories/GHSA-rvcw-f68w-8h8h","licence":"CC-BY-4.0","modified":"2026-07-08T06:01:00.776Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29446","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29446","licence":"Public domain","modified":"2026-06-17T03:47:39.480Z"}],"updatedAt":"2026-11-25T22:58:00.847Z","epss":{"score":0.01067,"percentile":0.65734,"date":"2026-12-01T12:00:22.000Z"}}