DX-1549-Resolved-BigInt-Buffer-Vulnerability #7066
Merged
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.
Mitigate GHSA-3gc7-fjrx-p6mg (high-severity buffer overflow in
bigint-buffer@<=1.1.5) impacting Solana paths in BitGoJS.What Changed:
bigint-bufferwith@trufflesuite/bigint-buffer@1.1.10via alias, ensuring all Solana dependencies resolve to the safe implementation.@solana/web3.js@1.95.8,@solana/spl-token@0.3.1->@solana/buffer-layout-utils@0.2.0).@bitgo/sdk-coin-sol(bigint-buffer-guard.ts) to validate input lengths and reduce misuse risk. It's purpose is to enforce input type/length checks around BigInt buffer operations; imported it so validations run at module loadMotivation / Context:
bigint-buffer@<=1.1.5has a buffer overflow intoBigIntLE(); the original package appears unmaintained. We migrate to a maintained alternative and add validation to protect Solana flows.Dependencies:
Alias:
bigint-buffer@npm:@trufflesuite/bigint-buffer@1.1.10Solana libs as above; no code changes required outside the guard and dependency updates.
Type of Change:
How Has This Been Tested?
Refer to comment in JIRA Ticket: DX-1549, for all test results.
Ticket: DX-1549