Repository navigation
Upgrade node version (against CVE-2026-111497) #61
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
Merged
cbeaudin-robotiq
merged 2 commits into
robotiq:main
from
cbeaudin-robotiq:update-node-version
Oct 29, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // Fails if the running Node.js bundles a Brotli decoder vulnerable to | ||
| // CVE-2026-111497 ("Node2Shell"): a crafted Brotli stream can corrupt | ||
| // memory in whatever decompresses it, and the build decompresses one — | ||
| // fetch() in fetch-profile-readme.js accepts `Content-Encoding: br`. | ||
| // Runs first in ci.yml and deploy.yml (before npm ci), | ||
| // and again via npm run generate. | ||
| // | ||
| // Only release lines with a fix are accepted, each from its first fixed | ||
| // version. Node 20 never got a fix, and odd lines (23, 25) are end of life. | ||
| // To move to a new line, add its first fixed version here, then update | ||
| // engines in package.json and .nvmrc. | ||
| // https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497 | ||
|
|
||
| const FIXED = { | ||
| 22: [22, 23, 4], | ||
| 24: [24, 22, 1], | ||
| 26: [26, 12, 1], | ||
| }; | ||
|
|
||
| function isFixed(version) { | ||
| const parts = version.replace(/^v/, '').split('.').map(Number); | ||
| const minimum = FIXED[parts[0]]; | ||
| if (!minimum) return false; | ||
| for (let i = 1; i < 3; i++) { | ||
| if (parts[i] !== minimum[i]) return parts[i] > minimum[i]; | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
| if (require.main === module) { | ||
| if (!isFixed(process.version)) { | ||
| const accepted = Object.values(FIXED).map((v) => `>=${v.join('.')}`).join(', '); | ||
| console.error(`check-node-version.js: Node ${process.version} is vulnerable to CVE-2026-111497; use one of ${accepted}`); | ||
| process.exit(1); | ||
| } | ||
| console.log(`check-node-version.js: Node ${process.version} is not affected by CVE-2026-111497`); | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.