Skip to main content
Vulnerability Database/CVE-2024-21484

CVE-2024-21484: Kjur Jsrsasign Information Disclosure

CVE-2024-21484 is an information disclosure vulnerability in Kjur Jsrsasign that exploits the Marvin security flaw in RSA decryption. This post covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-21484 Overview

CVE-2024-21484 affects the jsrsasign JavaScript cryptographic library before version 11.0.0. The package is vulnerable to an Observable Discrepancy [CWE-203] in the RSA PKCS1.5 and RSA-OAEP decryption routines. Attackers can exploit the Marvin flaw, a timing side-channel variant of the Bleichenbacher attack, to recover plaintext from captured ciphertexts. Successful exploitation requires network access to a decryption oracle and a large corpus of ciphertexts encrypted under the same RSA key. The flaw affects confidentiality of RSA-protected data without impacting integrity or availability.

Critical Impact

An attacker with sufficient ciphertext samples can decrypt RSA PKCS1.5 or RSA-OAEP protected data by measuring timing variations during the decryption process.

Affected Products

  • kjur:jsrsasign versions prior to 11.0.0 (npm)
  • jsrsasign WebJars packages (bower, bower-github-kjur, npm distributions)
  • Node.js and browser applications depending on vulnerable jsrsasign releases

Discovery Timeline

  • 2024-01-22 - CVE CVE-2024-21484 published to NVD
  • 2026-06-22 - Last updated in NVD database

Technical Details for CVE-2024-21484

Vulnerability Analysis

The vulnerability stems from timing differences in jsrsasign's RSA decryption code paths. When processing a ciphertext, the library performs different operations depending on whether the PKCS1.5 or OAEP padding is valid. These branches execute in measurably different amounts of time. An attacker observing response latency across many decryption attempts can distinguish valid from invalid padding structures. This is the Marvin attack pattern documented by Red Hat researchers against RSA implementations lacking constant-time padding verification.

The weakness falls under CWE-203 Observable Discrepancy. Exploitation targets confidentiality only, which is reflected in the attack preconditions: network-reachable decryption oracle, high attack complexity, and no privileges or user interaction required.

Root Cause

The jsrsasign RSA decryption routines do not implement constant-time padding validation. Padding check branches, error paths, and plaintext extraction take different execution times depending on ciphertext content. This leaks information about intermediate decryption state through observable timing discrepancies.

Attack Vector

An attacker submits large volumes of crafted ciphertexts to an endpoint that performs RSA decryption using jsrsasign with a static private key. By statistically analyzing response-time distributions, the attacker reconstructs plaintext bytes one at a time. The attack is remote and requires no authentication but demands a stable network path, a high-throughput decryption oracle, and significant computational resources. Refer to the Red Hat Marvin Tool for background on the attack methodology.

Detection Methods for CVE-2024-21484

Indicators of Compromise

  • Unusually high volumes of RSA decryption requests from a single client or small set of source addresses targeting the same key.
  • Repeated submission of malformed or near-identical ciphertexts to endpoints that perform RSA key exchange or decryption.
  • Sustained request patterns designed to measure response latency against a TLS or application decryption endpoint.

Detection Strategies

  • Inventory JavaScript dependencies using software composition analysis to identify jsrsasign versions below 11.0.0 in Node.js services, browser bundles, and WebJars-based Java projects.
  • Alert on application endpoints receiving abnormally high ratios of RSA decryption failures.
  • Correlate decryption error logs with source IP reputation and request frequency to flag oracle probing.

Monitoring Recommendations

  • Log and monitor timing of RSA decryption operations exposed by application APIs.
  • Track dependency drift in CI/CD pipelines to catch vulnerable jsrsasign reintroductions.
  • Review package-lock.json, yarn.lock, and WebJars manifests for pinned vulnerable versions.

How to Mitigate CVE-2024-21484

Immediate Actions Required

  • Upgrade jsrsasign to version 11.0.0 or later across all Node.js and browser projects. See the GitHub Release v11.0.0.
  • Audit WebJars and transitive dependencies to ensure the vulnerable package is not pulled in indirectly.
  • Rotate RSA private keys that were used by applications exposing jsrsasign decryption to untrusted callers.

Patch Information

The maintainer addressed the issue in jsrsasign 11.0.0. The fix and discussion are tracked in GitHub Issue #598. Snyk advisories provide ecosystem-specific guidance at SNYK-JS-JSRSASIGN-6070731 and the related WebJars entries SNYK-JAVA-ORGWEBJARSNPM-6070732, SNYK-JAVA-ORGWEBJARSBOWERGITHUBKJUR-6070733, and SNYK-JAVA-ORGWEBJARSBOWER-6070734.

Workarounds

  • Replace RSA PKCS1.5 and RSA-OAEP decryption calls with a cryptographic library that implements constant-time padding verification.
  • Prefer hybrid encryption using ephemeral keys so that any single oracle session cannot be amortized across many ciphertexts.
  • Rate-limit and authenticate endpoints that perform RSA decryption to reduce oracle access.
bash
# Upgrade jsrsasign in a Node.js project
npm install jsrsasign@^11.0.0
npm ls jsrsasign

# Audit for remaining vulnerable copies
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.