CVE-2025-6545: pbkdf2 Predictable Output for Unsupported and Non-Normalized Algorithms

pbkdf2 Updated 14 Dec 2025

Summary

23/06/2025
Yes i
Critical
9.1

CVE-2025-6545: pbkdf2 returns predictable uninitialized/zero-filled memory for non-normalized or unimplemented algos. Affects pbkdf2 versions >= 3.0.10, < 3.1.3. Fixed in 3.1.3. How to fix ↓

Also tracked for

The same CVE-2025-6545 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

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 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

The 'pbkdf2' package is a widely used cryptographic library in the Node.js ecosystem that implements the PBKDF2 key derivation function. It is designed to enhance security by making brute-force attacks more difficult through the use of a salt and multiple iterations. However, certain versions of this package have a vulnerability that allows for predictable output when using unsupported or non-normalized algorithms, undermining the security of derived keys.

Vulnerability Detail

The vulnerability arises from the handling of unsupported algorithms (like 'sha3-256', 'sha3-512', and 'sha512-256') and non-normalized algorithm names (like 'Sha256', 'SHA1', etc.). When these algorithms are used, the 'pbkdf2' implementation returns predictable output, which can lead to security breaches. Specifically, in Node.js environments, uninitialized memory is returned, while in browser environments, zero-filled buffers are returned. This can result in weak keys being generated, making applications susceptible to attacks.

How To Fix

Latest published version: 3.1.7 as of 23 Oct 2026

npm install pbkdf2@3.1.7

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.1.3

This is the first release that contains the fix.

npm install pbkdf2@3.1.3

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

Workaround

If immediate upgrading is not feasible, avoid using unsupported or non-normalized algorithms in your key derivation processes. Instead, stick to the following supported algorithms: 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'rmd160', and 'ripemd160'. Here is an example of how to use a supported algorithm:

const crypto = require('crypto');
const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 64, 'sha256');
console.log(key.toString('hex'));

Conclusion

The vulnerability CVE-2025-6545 in the 'pbkdf2' package poses a significant risk by allowing predictable key outputs for certain algorithms. It is crucial to update to the patched version or implement workarounds to mitigate potential security threats.

See every vulnerability recorded for pbkdf2 →

Share this vulnerability

FAQ

CVE-2025-6545 is a vulnerability in the 'pbkdf2' package that allows for predictable output when using unsupported or non-normalized algorithms, compromising the security of derived keys.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Check your application against CVE-2025-6545 using the Vulert playground at Vulert Scanner.

The consequences include the generation of weak keys that can be easily predicted, making applications vulnerable to brute-force attacks and other security breaches.

You can update the package by running the command 'npm install pbkdf2@3.1.3' in your project directory to ensure you are using a secure version.

If you cannot upgrade, avoid using unsupported or non-normalized algorithms in your key derivation processes and stick to the supported algorithms listed in the documentation.

Related vulnerabilities

Recent vulnerabilities recorded for pbkdf2.

How To Fix

Latest published version: 3.1.7 as of 23 Oct 2026

npm install pbkdf2@3.1.7

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.1.3

This is the first release that contains the fix.

npm install pbkdf2@3.1.3

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