fix: complete patch for GHSA-mvf2-f6gm-w987 and #586#598
Merged
SociableSteve merged 3 commits intonearform:masterfrom Apr 7, 2026
Merged
fix: complete patch for GHSA-mvf2-f6gm-w987 and #586#598SociableSteve merged 3 commits intonearform:masterfrom
SociableSteve merged 3 commits intonearform:masterfrom
Conversation
…xed RSA Public Key
… in EC/PKCS8 decodin
SociableSteve
requested changes
Apr 7, 2026
Contributor
SociableSteve
left a comment
There was a problem hiding this comment.
A minor change to get this ready.
| } | ||
| }) | ||
|
|
||
| test('detectPublicKeyAlgorithms - EC public key with leading whitespace must be detected as EC (not HMAC)', t => { |
Contributor
There was a problem hiding this comment.
This is a duplicate of the test above it. We can probably remove it.
Contributor
|
Hi 👋 Thanks for this PR. FYI there are 3 open CVEs against this repo at the moment and we are actively working to get through them as expeditiously as possible. |
Contributor
Author
Oh yes! Done. Good catch on the duplicate test. |
SociableSteve
approved these changes
Apr 7, 2026
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 branch builds directly on the initial work started by
@antoatta85in #586, but incorporates the missing code review feedback raised by@FlowmasterHaggla.keywithtrimmedKeywhen callingECPrivateKey.decodeandPrivateKey.decodeinsrc/crypto.jsto ensure EC/PKCS8 private keys with whitespace do not crash the parser.test/crypto.spec.jsto use aleadingWhitespacePrefixesarray, testing multiple combinations (\n, spaces, tabs, and mixed\n) to mathematically guarantee the.trim()logic cannot be bypassed by any whitespace permutation.Fixes #589