Skip to content

Conversation

@npm-cli-bot
Copy link
Contributor

11.6.1 (2025-09-23)

Bug Fixes

Documentation

Dependencies

Chores

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run. npm Issues and PRs related to the npm client dependency or the npm registry. labels Sep 25, 2025
@github-actions
Copy link
Contributor

Fast-track has been requested by @nodejs-github-bot. Please 👍 to approve.

@wraithgar
Copy link
Contributor

The main update here is getting our subdependencies updated. Most of the npmcli ones needed semver major changes to get up to the same engines declaration as npm itself. This is a follow up task to any new major npm release, but this one just took awhile.

@richardlau richardlau added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Sep 25, 2025
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2025
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 removed the fast-track PRs that do not need to wait for 48 hours to land. label Sep 30, 2025
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 30, 2025
@nodejs-github-bot
Copy link
Collaborator

@addaleax addaleax added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 2, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 2, 2025
@nodejs-github-bot nodejs-github-bot merged commit 5d843c9 into nodejs:main Oct 2, 2025
82 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 5d843c9

targos pushed a commit that referenced this pull request Oct 6, 2025
PR-URL: #60012
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@ChALkeR
Copy link
Member

ChALkeR commented Oct 27, 2025

This introduced a tar version which could expose uninitialized memory if zero-fill is disabled in #60423

See isaacs/node-tar#445

  1. Is affected code ever called from npm?
  2. If yes, is returning uninitialized process memory a concern?

@wraithgar
Copy link
Contributor

wraithgar commented Oct 27, 2025

I don't believe npm does any synchronous operations with tar.

$ npm query \#tar|npx json -a _id location from
tar@7.5.1 node_modules/tar [
  "node_modules/node-gyp",
  "node_modules/pacote",
  "workspaces/libnpmdiff",
  "node_modules/node-gyp/node_modules/cacache",
  ""
]

node-gyp does an async extract

$ grep -r tar\\. node_modules/node-gyp/lib/
node_modules/node-gyp/lib/install.js:          await tar.extract({
node_modules/node-gyp/lib/install.js:              tar.extract({

pacote does an async extract and list

node_modules/pacote/lib/dir.js:      .then(files => tar.c(tarCreateOptions(this.package), files)
node_modules/pacote/lib/fetcher.js:    const extractor = tar.x(this.#tarxOptions({ cwd: dest }))

libnpmdiff does an async create and list

workspaces/libnpmdiff/lib/index.js:const untar = require('./untar.js')
workspaces/libnpmdiff/lib/tarball.js:      tar.c(tarCreateOptions(manifest), files).concat()
workspaces/libnpmdiff/lib/untar.js:  tar.list({

npm itself does an async list

lib/utils/tar.js:  const stream = tar.t({

cacache never actually used it npm/cacache#312

@ChALkeR
Copy link
Member

ChALkeR commented Oct 28, 2025

@wraithgar Thanks! I also rechecked the usage here and it appears that the problematic codepath is indeed not used from npm

@ChALkeR
Copy link
Member

ChALkeR commented Oct 28, 2025

For context: this had to be rechecked even if npm is just a tool not used in app runtime, it still has secrets like env vars and npm token in its memory, and leaking that e.g. while unpacking to disk under race conditions would have been... problematic. (e.g. npm already had an issue of saving env vars to disk back in the days which led to credentials exposure)

good thing that it's not affected)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. needs-ci PRs that need a full CI run. npm Issues and PRs related to the npm client dependency or the npm registry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants