Generation of Predictable Numbers or Identifiers Affecting org.webjars.npm:pbkdf2 package, versions [0,]


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-10495499
  • published24 Jun 2025
  • disclosed23 Jun 2025
  • creditNikita Skovoroda

Introduced: 23 Jun 2025

NewCVE-2025-6547  (opens in a new tab)
CWE-340  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to Generation of Predictable Numbers or Identifiers via the toBuffer function. An attacker can predict cryptographic keys that were generated using Uint8Array inputs on affected Node.js versions, leading to compromised security of derived keys or passwords.

Note: This is only exploitable when used in the environment running Node.js or io.js in versions lower than 3.0.0.

Mitigation

Updating to a fixed version isn't sufficient if PBKDF2 was used directly or via a bundling package with algorithm arguments outside the specified list. Verify where those keys are stored, how they are used, and take necessary actions like rotation or replacement.

PoC

require('pbkdf2').pbkdf2Sync(new Uint8Array([1,2,3]), new Uint8Array([1,3,4]), 1024, 32, 'sha256')

References

CVSS Base Scores

version 4.0
version 3.1