Skip to content

Conversation

@tanjeemh
Copy link
Contributor

@tanjeemh tanjeemh commented Sep 23, 2025

Mitigate GHSA-3gc7-fjrx-p6mg (high-severity buffer overflow in bigint-buffer@<=1.1.5) impacting Solana paths in BitGoJS.

What Changed:

  • Replaced transitive bigint-buffer with @trufflesuite/bigint-buffer@1.1.10 via alias, ensuring all Solana dependencies resolve to the safe implementation.
  • Ensured Solana deps resolve through versions that pick up the alias (e.g., @solana/web3.js@1.95.8, @solana/spl-token@0.3.1 -> @solana/buffer-layout-utils@0.2.0).
  • Added a lightweight runtime guard for BigInt<->Buffer conversions in @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 load
  • Removed any audit suppression related to this advisory so future scans surface regressions.

Motivation / Context:
bigint-buffer@<=1.1.5 has a buffer overflow in toBigIntLE(); 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.10
Solana libs as above; no code changes required outside the guard and dependency updates.

Type of Change:

  • Bug fix (non-breaking change which fixes a security issue)

How Has This Been Tested?
Refer to comment in JIRA Ticket: DX-1549, for all test results.

Ticket: DX-1549

zahin-mohammad
zahin-mohammad previously approved these changes Sep 24, 2025
mukeshsp
mukeshsp previously approved these changes Sep 26, 2025
@tanjeemh tanjeemh force-pushed the DX-1549-bigint-buffer-advisory branch from 1814a3b to 4f762b2 Compare September 29, 2025 18:51
@tanjeemh tanjeemh merged commit 052be0b into master Sep 30, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants