CVE-2021-29446 — jose-node-cjs-runtime
MEDIUMCVE-2021-29446 is a medium-severity (CVSS 5.9) CWE-203 vulnerability in jose-node-cjs-runtime. A fix is available for jose-node-cjs-runtime — see the affected versions and patch details below.
Padding Oracle Attack due to Observable Timing Discrepancy in jose-node-cjs-runtime
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
jose-node-cjs-runtimenpmDescription
Impact
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).
Patches
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.
Credits
Thanks to Morgan Brown of Microsoft for bringing this up and Eva Sarafianou (@esarafianou) for helping to score this advisory.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | jose-node-cjs-runtime | all versions | 3.11.4npm install jose-node-cjs-runtime@3.11.4 |
Affected Products
jose-node-cjs-runtimejose-node-cjs-runtime_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jose-node-cjs-runtime, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update jose-node-cjs-runtime to 3.11.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-29446 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2021-29446 in your dependencies?
Find it across npm, including transitive dependencies.