Skip to content

fix(deps): require patched Node for CVE-2026-111497 - #60

Open
Adi-ty wants to merge 4 commits into
mainfrom
fix/node-cve-2026-111497
Open

Adi-ty wants to merge 4 commits into
mainfrom
fix/node-cve-2026-111497

Conversation

@Adi-ty

@Adi-ty Adi-ty commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Raises .nvmrc to 22.23.4 and the engines floor to ^22.23.4 || ^24.22.1 || >=26.12.1, so installing on a Node release affected by CVE-2026-111497 (high, Brotli decoder OOB write) shows an npm EBADENGINE warning. The getting-started docs now name each patched line.

engines stays advisory on purpose. Node only runs dev tooling here (build, lint, tests, wp-env), never in production, so the exposure is minimal. An engine-strict commit was added and then reverted: it made installs fail on affected Node, which also broke CI. The shared wp-ci.yml@v1 doesn't read .nvmrc yet and installs the runner's cached Node 22.23.3. rtCamp/wp-shared-workflows#47 fixes that, and once it's merged and v1 is moved, CI here runs on 22.23.4.

Ref: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases

Fixes/Covers issue

N/A

Node.js 22.23.4, 24.22.1 and 26.12.1 fix CVE-2026-111497, a high-severity out-of-bounds write in the Brotli decoder. Raise .nvmrc (which the shared CI workflows read) and the engines floor so earlier, affected releases warn on  install.
Ref: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
@Adi-ty
Adi-ty marked this pull request as ready for review October 23, 2026 12:36
Copilot AI balanced review requested due to automatic review settings October 23, 2026 12:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

1 open issue
What changed in this PR

Updates the project’s required Node.js versions to ensure developers/CI use patched releases that address CVE-2026-111497, and aligns onboarding docs accordingly.

Changes:

  • Bumped package.json engines.node to require patched Node versions.
  • Updated .nvmrc to pin a patched Node version used by shared CI workflows.
  • Adjusted getting-started documentation to match the new minimum Node version.
File Description
package.json Raises the Node engine range to patched versions to prevent use of vulnerable runtimes.
docs/​getting-started.md Updates the stated minimum Node version to match .nvmrc.
.nvmrc Pins Node to a patched version used by tooling/CI that reads .nvmrc.

Review effort: Lite

Comment thread package.json
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
npm treats engines as advisory, so an affected Node only got an EBADENGINE warning. engine-strict makes npm ci / npm i (including Composer's npm i hook) fail instead. Patched 22.23.4 and 24.22.1 still install cleanly.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues

Review effort: Lite

Comment thread .npmrc Outdated
Comment on lines +11 to +13
; Fail the install, instead of only warning, on a Node outside package.json
; engines, so releases affected by CVE-2026-111497 are refused.
engine-strict = true
Comment thread docs/getting-started.md Outdated
- **Composer 2**
- **PHP 8.2+** (for Composer and the host-side PHPCS/PHPStan checks)
- **Node and npm** matching [`.nvmrc`](../.nvmrc) (Node 22.22.2 or later) — use `nvm` or another version manager
- **Node and npm** matching [`.nvmrc`](../.nvmrc) (Node 22.23.4 or later) — use `nvm` or another version manager
Adi-ty and others added 2 commits October 23, 2026 19:45
engine-strict turned the engines floor into a hard install failure. Node
here only runs dev tooling (build, lint, tests, wp-env), so CVE-2026-111497
exposure is minimal, and the security ask is the .nvmrc and engines bump,
not enforcement. engine-strict also failed CI, since the shared wp-ci@v1
installs the runner-cached Node 22.23.3 instead of reading .nvmrc
(rtCamp/wp-shared-workflows#47). Affected releases still get an npm
EBADENGINE warning.

This reverts commit 940b514.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"22.23.4 or later" read as if any newer Node were fine, but 24.21.0 is
newer and still affected, and engines rejects it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open issues

Review effort: Lite

Comment thread package.json
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
Comment thread docs/getting-started.md
- **Composer 2**
- **PHP 8.2+** (for Composer and the host-side PHPCS/PHPStan checks)
- **Node and npm** matching [`.nvmrc`](../.nvmrc) (Node 22.22.2 or later) — use `nvm` or another version manager
- **Node and npm** matching [`.nvmrc`](../.nvmrc) (Node 22.23.4; 24.22.1+ and 26.12.1+ also meet `engines` in `package.json`) — use `nvm` or another version manager

This branch has not been deployed

No deployments
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