CVE-2026-102414

Description

A flaw was found in pbkdf2. A remote attacker can cause a Denial of Service (DoS) by submitting an excessively long password to an application utilizing the fallback key derivation routine. Because the library repeatedly re-hashes the full password on every iteration instead of pre-hashing it once, processing such input consumes excessive computational resources and can block the application event loop.

Statement

A low impact denial of service flaw was found in the pbkdf2 npm package. In the library's JavaScript fallback key derivation routine, a password longer than the hash function's block size is passed to HMAC as the key on every iteration, and HMAC hashes such keys in full each time, instead of being pre-hashed once as the HMAC specification requires. A remote attacker who can submit an excessively long password to an application that uses this fallback can cause computational cost proportional to the number of iterations multiplied by the password length, consuming excessive CPU resources and blocking the application's event loop. Only availability is affected; confidentiality and integrity are not affected. Node.js 0.12 and later and browser builds are not affected, because they do not use this fallback. Red Hat rates this flaw as low severity (CVSS 3.7) rather than the moderate severity of the upstream CVEORG CVSS v4 assessment (6.3), because exploitation requires specific preconditions: the application must run in an environment where the JavaScript fallback is used, such as a runtime whose native pbkdf2 implementation fails the library's feature check or a direct import of the fallback module, and the application must not enforce a maximum password length. No Red Hat products are currently listed as affected by this flaw.

Mitigation

Applications can mitigate this issue by enforcing a reasonable maximum password length before passing user-supplied passwords to the pbkdf2 key derivation routines; applications that enforce such a limit are not meaningfully affected. Because the HMAC specification requires keys longer than the hash block size to be pre-hashed to the block size, applications may also pre-hash the password with the same digest before passing it to pbkdf2, which produces the same derived key while avoiding the repeated hashing of the full password. As a permanent resolution, update the pbkdf2 package to version 3.1.7 or later, which contains the upstream fix.

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Resource Consumption (CPU)

When an attacker can directly invoke the blocking code, or the blocking code can be affected by environmental conditions that can be influenced by an attacker, then this can lead to a denial of service by causing unexpected hang or freeze of the code. An unexpected call to blocking code can trigger an infinite loop, or a large loop that causes the software to pause and wait indefinitely.

Frequently Asked Questions

Want to get errata notifications? Sign up here.