-
Notifications
You must be signed in to change notification settings - Fork 108
Fix: Resolve critical crypto vulnerabilities (CVE-2025-9288, CVE-2025-9287) #1534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…-2025-9288) - Add yarn resolution for sha.js@^2.4.12 to address hash state rewind vulnerability - Fixes critical security issue where hash state could be manipulated via crafted input - All crypto operations validated - builds and tests passing - Affects all blockchain operations (Bitcoin, Ethereum, etc.)
📝 WalkthroughWalkthroughAdded two pinned dependency resolutions to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (1)
package.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (2)
package.json (2)
46-47
: Good hotfix: 2.4.12 is the patched version for CVE-2025-9288.Upgrading sha.js to 2.4.12 remediates the hash state rewind bug (affected: <=2.4.11; fixed: 2.4.12).
References: GitHub Advisory DB, OSV, and vendor feeds confirm the fix window. (github.com, osv.dev, advisories.gitlab.com, ubuntu.com)
46-47
: No straggling sha.js versions—verification passed: Yarn resolves every sha.js dependency to 2.4.12, and no workspace directly depends on sha.js.
package.json
Outdated
"elliptic": "^6.6.1", | ||
"sha.js": "^2.4.12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root-level resolution doesn’t protect downstream consumers of published packages.
This only enforces the fix for this monorepo’s installs. If any published XChainJS packages ship code that (directly or transitively) pulls sha.js, consumers can still resolve a vulnerable version. Propagate the fix by bumping direct deps or adding a direct "sha.js": "^2.4.12" dependency in each affected workspace package and cut patch releases via Changesets.
Follow-ups:
- Add/upgrade direct deps (or bump intermediates like create-hash/crypto-browserify if they carry sha.js).
- Run a patch release across affected packages so users get the fix without relying on their own resolutions.
If you want, I can script the package-by-package updates.
Summary
sha.js
from vulnerable ≤2.4.11 to secure 2.4.12 via yarn resolutioncipher-base
from vulnerable ≤1.0.4 to secure 1.0.6 via yarn resolutionSecurity Impact
Critical vulnerabilities resolved: Both
sha.js
andcipher-base
had hash state rewind bugs that could allow attackers to:{length: -x}
This affects all XChainJS blockchain clients (Bitcoin, Ethereum, THORChain, MAYAChain, etc.) since these libraries are used throughout crypto operations for transaction signing, address generation, and key derivation.
Changes
"sha.js": "2.4.12"
to yarn resolutions in root package.json"cipher-base": "1.0.6"
to yarn resolutions in root package.json[email protected]
Fixes
bncClient.getBalance
#31 (sha.js CVE-2025-9288)Test plan
Summary by CodeRabbit