CVE-2023-46233: Weakness in crypto-js PBKDF2

crypto-js Updated 02 Oct 2025

Summary

25/10/2023
Yes i
Critical
9.1

CVE-2023-46233: crypto-js PBKDF2 1,000 times weaker than specified in 1993 and 1.3M times weaker than current standard. Affects crypto-js versions < 4.2.0. Fixed in 4.2.0. How to fix ↓

Also tracked for

The same CVE-2023-46233 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Crypto-js is an open-source JavaScript library that provides cryptographic functionality such as encryption, decryption, and hashing. It is widely used for various security-related operations in web applications. However, the PBKDF2 implementation in crypto-js has a severe vulnerability that makes it significantly weaker than the industry standard. This vulnerability affects all versions of the package.

Vulnerability Detail

The crypto-js PBKDF2 implementation defaults to using the SHA1 hash algorithm, which has been considered insecure since 2005. Additionally, it uses only one iteration, while the current industry standard recommends at least 1,300,000 iterations. These weaknesses significantly reduce the strength and security of the derived keys. An attacker can exploit this vulnerability to create identical cryptographic signatures for different inputs, potentially leading to unauthorized access or data manipulation. The impact is particularly high when this vulnerability is used to protect passwords or generate signatures.

How To Fix

Latest published version: 4.2.0 as of 22 Oct 2026

npm install crypto-js@4.2.0

The newest release already contains this fix.

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

Workaround

If upgrading to the latest version is not feasible, an alternative workaround is to manually configure the PBKDF2 parameters in the code. Specifically, the hash algorithm should be changed to a more secure one (e.g., SHA256), and the number of iterations should be increased to a value recommended by industry standards (e.g., 1,300,000). Here's an example of how to configure PBKDF2 with SHA256 and 1,300,000 iterations in crypto-js:

const CryptoJS = require('crypto-js');

const password = 'myPassword';
const salt = 'mySalt';
const iterations = 1300000;
const keySize = 256;

const derivedKey = CryptoJS.PBKDF2(password, salt, {
  keySize: keySize / 32,
  iterations: iterations,
  hasher: CryptoJS.algo.SHA256
});

Conclusion

The crypto-js PBKDF2 vulnerability poses a significant risk to applications using this package for cryptographic operations. It is crucial to upgrade to the latest version or apply the recommended workaround to ensure the security of derived keys. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for crypto-js →

Share this vulnerability

FAQ

Crypto-js is an open-source JavaScript library that provides cryptographic functionality for web applications.

PBKDF2 is a key-derivation function used to stretch or squash a password's entropy into a fixed size and reduce the chance of password recovery.

The crypto-js PBKDF2 implementation defaults to using the insecure SHA1 hash algorithm and a low number of iterations, making it significantly weaker than the industry standard.

This vulnerability can lead to unauthorized access or data manipulation, especially when used to protect passwords or generate signatures.

To fix this vulnerability, upgrade to version 4.2.0 or later of the crypto-js package. Alternatively, manually configure PBKDF2 with a more secure hash algorithm and a higher number of iterations.

Related vulnerabilities

Recent vulnerabilities recorded for crypto-js.

How To Fix

Latest published version: 4.2.0 as of 22 Oct 2026

npm install crypto-js@4.2.0

The newest release already contains this fix.

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