CVE-2021-29446: Padding Oracle Attack in jose-node-cjs-runtime

jose-node-cjs-runtime Updated 02 Oct 2025

Summary

19/04/2021
Yes i
Moderate
5.9

CVE-2021-29446: Padding Oracle Attack due to Observable Timing Discrepancy in jose-node-cjs-runtime. Affects jose-node-cjs-runtime versions < 3.11.4. Fixed in 3.11.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

jose-node-cjs-runtime is an npm package that provides a JavaScript implementation of the JSON Object Signing and Encryption (JOSE) standards. It offers functionality for creating, signing, and encrypting JSON Web Tokens (JWTs) using various algorithms. The package is widely used in applications that require secure token-based authentication and data exchange. However, a vulnerability has been discovered in the package that could lead to a padding oracle attack.

Vulnerability Detail

The vulnerability (CVE-2021-29446) in jose-node-cjs-runtime arises from an observable timing discrepancy during the decryption process of AES_CBC_HMAC_SHA2 algorithms. When a padding error occurs while decrypting the ciphertext, there is a difference in timing that can be exploited by an attacker to perform a padding oracle attack. By leveraging this timing difference, an adversary could potentially decrypt data without knowledge of the decryption key. This attack requires issuing an average of 128*b calls to the padding oracle, where b is the number of bytes in the ciphertext block. The impact of this vulnerability is moderate, as it allows unauthorized access to encrypted data.

How To Fix

Latest published version: 5.10.0 as of 22 Oct 2026

npm install jose-node-cjs-runtime@5.10.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.11.4

This is the first release that contains the fix.

npm install jose-node-cjs-runtime@3.11.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

In conclusion, the jose-node-cjs-runtime package is vulnerable to a padding oracle attack due to an observable timing discrepancy during decryption. Upgrading to version 3.11.4 or higher of the package is necessary to mitigate this vulnerability. It is crucial for users to update their installations promptly to ensure the security of their token-based authentication and data exchange systems. For further support and assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jose-node-cjs-runtime →

Share this vulnerability

FAQ

jose-node-cjs-runtime is an npm package that provides a JavaScript implementation of the JSON Object Signing and Encryption (JOSE) standards. It is commonly used for creating, signing, and encrypting JSON Web Tokens (JWTs) in secure authentication systems.

A padding oracle attack is a cryptographic attack that exploits the difference in timing or error messages resulting from padding validation in cryptographic systems. In this specific vulnerability, the timing discrepancy allows an attacker to decrypt data without knowing the decryption key.

The impact of this vulnerability is moderate. It allows an attacker to perform a padding oracle attack and potentially decrypt encrypted data without knowledge of the decryption key.

To fix this vulnerability, you should upgrade to version 3.11.4 or higher of jose-node-cjs-runtime. This version includes a patch that verifies the HMAC tag before performing CBC decryption, preventing the timing discrepancy that enables the padding oracle attack.

No, there is no known workaround for this vulnerability. It is recommended to upgrade to the fixed version of jose-node-cjs-runtime.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 5.10.0 as of 22 Oct 2026

npm install jose-node-cjs-runtime@5.10.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.11.4

This is the first release that contains the fix.

npm install jose-node-cjs-runtime@3.11.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback