Skip to content

[Snyk] Security upgrade protobufjs from 6.11.3 to 7.5.5#764

Open
revan-zhang wants to merge 1 commit into
onekeyfrom
snyk-fix-64342d66c4099d3830b2d3d24c8e185c
Open

[Snyk] Security upgrade protobufjs from 6.11.3 to 7.5.5#764
revan-zhang wants to merge 1 commit into
onekeyfrom
snyk-fix-64342d66c4099d3830b2d3d24c8e185c

Conversation

@revan-zhang
Copy link
Copy Markdown
Contributor

@revan-zhang revan-zhang commented Apr 21, 2026

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the yarn dependencies of this project.

Snyk changed the following file(s):

  • packages/hd-transport/package.json

Note for zero-installs users

If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the .yarn/cache/ directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

⚠️ Warning
Failed to update the yarn.lock, please update manually before merging.

Vulnerabilities that will be fixed with an upgrade:

Issue
critical severity Arbitrary Code Injection
SNYK-JS-PROTOBUFJS-16094665

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Arbitrary Code Injection


Open in Devin Review

@revan-zhang
Copy link
Copy Markdown
Contributor Author

revan-zhang commented Apr 21, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

@@ -26,6 +26,6 @@
"dependencies": {
"bytebuffer": "^5.0.1",
"long": "^4.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 long dependency not updated from v4 to v5 to match protobufjs v7's requirement

protobufjs v7.5.5 declares a dependency on long@^5.0.0 (verified via npm view protobufjs@7.5.5 dependencies), but hd-transport still has "long": "^4.0.0" at line 28. Since ^4.0.0 resolves to >=4.0.0 <5.0.0, these ranges are mutually exclusive, causing two separate copies of long to be installed. The code at packages/hd-transport/src/index.ts:2 does import * as Long from 'long' (resolving to long v4) and then at packages/hd-transport/src/index.ts:14 sets protobuf.util.Long = Long, feeding protobufjs v7 a Long v4 constructor when it was designed around Long v5. While the core Long API (.toNumber(), .toString(), fromBits, etc.) is similar between v4 and v5, this is an incomplete migration that duplicates the long package in the bundle and risks subtle incompatibilities in the 64-bit integer serialization path used by packages/hd-transport/src/serialization/protobuf/decode.ts:21-28.

Suggested change
"long": "^4.0.0",
"long": "^5.0.0",
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

2 participants