Node.js is vulnerable to the Marvin Attack (timing variant of the Bleichenbacher attack against PKCS#1 v1.5 padding)
The privateDecrypt() API in Node.js's crypto library had a timing side-channel in PKCS#1 v1.5 padding error handling, showing measurable timing differences between valid and invalid ciphertexts. An attacker could remotely exploit this to decrypt captured RSA ciphertexts or forge signatures, particularly against API endpoints processing JSON Web Encryption messages.
- Triaged in 30 days
- Fixed in 3 months
- Disclosed after 3 months
Summary by the program
A vulnerability in the privateDecrypt() API of the crypto library, allowed a covert timing side-channel during PKCS#1 v1.5 padding error handling.
The vulnerability revealed significant timing differences in decryption for valid and invalid ciphertexts.
This poses a serious threat as attackers could remotely exploit the vulnerability to decrypt captured RSA ciphertexts or forge signatures, especially in scenarios involving API endpoints processing Json Web Encryption messages.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the PKCS#1 v1.5 padding error handling in privateDecrypt() was not constant-time, so valid and invalid ciphertexts produced distinguishable timing differences.
Impact
Attackers could remotely exploit the timing differences to decrypt captured RSA ciphertexts or forge signatures, especially where API endpoints process JSON Web Encryption messages.
What the attacker needed
Ability to measure decryption timing remotely; target uses privateDecrypt() with PKCS#1 v1.5; many repeated decryption attempts
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program decrypts data, it sometimes takes slightly longer to reject bad input than good input. If an attacker can measure those tiny timing differences over many attempts, they can gradually learn secret information. This report says Node.js's decryption function leaked such timing differences, which could let an attacker recover encrypted data or forge signatures.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.