Update dependency pbkdf2 to v3.1.3 [SECURITY]#1056
Open
renovate[bot] wants to merge 1 commit intodevelopfrom
Open
Update dependency pbkdf2 to v3.1.3 [SECURITY]#1056renovate[bot] wants to merge 1 commit intodevelopfrom
renovate[bot] wants to merge 1 commit intodevelopfrom
Conversation
8098a65 to
52dd736
Compare
52dd736 to
3180710
Compare
3180710 to
91f90ea
Compare
91f90ea to
81104c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1.2→3.1.3GitHub Vulnerability Alerts
CVE-2025-6545
Summary
This affects both:
sha3-256/sha3-512/sha512-256)Sha256/Sha512/SHA1/sha-1/sha-256/sha-512)All of those work correctly in Node.js, but this polyfill silently returns highly predictable ouput
Under Node.js (only with
pbkdf2/browserimport, unlikely) / Bun (pbkdf2top-level import is affected), the memory is not zero-filled but is uninitialized, asBuffer.allocUnsafeis usedUnder browsers, it just returns zero-filled buffers
(Which is also critical, those are completely unacceptable as kdf output and ruin security)
Were you affected?
The full list of arguments that were not affected were literal:
'md5''sha1''sha224''sha256''sha384''sha512''rmd160''ripemd160'Any other arguments, e.g. representation variations of the above ones like
'SHA-1'/'sha-256'/'SHA512'or different algos like'sha3-512'/'blake2b512', while supported on Node.jscryptomodule, returned predictable output onpbkdf2(orcryptobrowser/bundlers polyfill)Beware of packages re-exporting this under a different signature, like (abstract):
In this case, the resulting
deriveKeymethod is also affected (to the same extent / conditions as listed here).Environments
This affects
require('crypto')in polyfilled mode (e.g. fromcrypto-browserify,node-libs-browser,vite-plugin-node-polyfills,node-stdlib-browser, etc. -- basically everything that bundles/polfyillscryptorequire('crypto')andrequire('pbkdf2')require('pbkdf2')(orrequire('crypto')obviously), but affectsrequire('pbkdf2/browser')require('pbkdf2')andrequire('pbkdf2/browser')(and returns uninitialized memory, often zeros / sparse flipped bytes)PoC
Output (odd lines are Node.js, even is
pbkdf2module / polyfill):Uninitialized memory
Affected versions
Seems to be since browserify/pbkdf2@9699045
Impact
This is critical, browserifying code might silently generate zero-filled keys instead of proper ones, for code that was working on Node.js or in test environment
Just updating to a fixed version is not enough: if anyone was using
pbkdf2lib (e.g. viacrypto-browserifyor directly) on algos not from the literal string list (see "were you affected"), recheck where those keys went / how they were used, and take action accordinglyNote
Most likely, you receive this either through a subdep using
pbkdf2module directly (and then it is used), or throughcrypto-browserify(and the usage depends on whether you or any of your subdeps were callingpbkdf2/pbkdf2Syncmethods from Node.js crypto inside your bundle)When targeting non-Node.js, prever avoiding Node.js crypto polyfill at all, and use
crypto.subtleand/or modern/audited cryptography primitives insteadRelease Notes
browserify/pbkdf2 (pbkdf2)
v3.1.3Compare Source
Commits
8b067309a76e2f6fd84bfauto-changelog796c38d3661fb07431b57eb9f97a26d4fd3513906aab04da889694cfd0d534bto-buffere3102a8fca0c9da2c7d93filestonpmignore7f31fbc8d628e8fc61005create-hmac,safe-buffer,sha.jsae2a7d0create-hash,ripemd160due to breaking changese07996845fbcf319ea57b645e252Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.