镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[BUG] vulnerable glob dependency #8741

Closed

Description

@keptt

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Running npm audit or a trivy scanner flags a high CVE-2025-64756 vulnerability due to glob@11.0.3. glob@11.1.0 fixes the issue. The problem is that this breaks application builds that make use of tools such as trivy scanner.
Notice that the CVE itself doesn't affect npm, as the issue is only in the cli interface of glob, while npm uses its library interface.

Expected Behavior

npm should not bundle a vulnerable version of glob and therefore not break builds due to security scans

Steps To Reproduce

  1. In this environment:

Node.js version: 20.17.0 (or higher)
npm version: 11.6.2

  1. Run 'npm audit'
  2. See error:
glob  10.3.7 - 11.0.3
Severity: high
glob CLI: Command injection via -c/--cmd executes matches with shell:true - https://github.com/advisories/GHSA-5j98-mcp5-4vw2
fix available via `npm audit fix`
node_modules/glob

Environment

  • npm: 11.6.2
  • Node.js: 20.17.0
  • OS Name: macOS Sequoia 15.6.1
  • System Model Name: MacBook Pro M3
  • npm config:
; "user" config from /Users/root1/.npmrc

//registry.npmjs.org/:_authToken = (protected)

; "project" config from /Users/root1/code/npm/.npmrc

package-lock = true

; node bin location = /Users/root1/.nvm/versions/node/v20.17.0/bin/node
; node version = v20.17.0
; npm local prefix = /Users/root1/code/npm
; npm version = 11.6.2
; cwd = /Users/root1/code/npm
; HOME = /Users/root1
; Run `npm config ls -l` to show all defaults.

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    on Nov 18, 2025
  2. JeffreyStevens commented on Nov 19, 2025

    @JeffreyStevens

    I'm also seeing issues with docker node:22-alpine image scans failing on these locations for glob (see node-gyp dependency):

    /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/package.json
    /usr/local/lib/node_modules/npm/node_modules/glob/package.json

    Related tar image also failing security scans:
    /usr/local/lib/node_modules/npm/node_modules/tar/package.json

    I opened related issue nodejs/node-gyp#3246

  3. keptt commented on Nov 20, 2025

    @keptt
    Author

    npm 11.6.3 has just released but unfortunately this issue hasn't been addressed. Will have to wait for the next release. A temporary solution on the client-end seems to be creating a .trivyignore file with the CVE in-qeustion. Other security scanners should have a similar ignore-rule feature. This is, however, not ideal, as such practices may lead to false negatives

    EDIT: to avoid false negatives, use .trivyignore.yml or a Rego file. They let you use more advanced filtering such as specifying a path to the vulnerable package. However, these features are experimental according to the Trivy docs

  4. owlstronaut commented on Nov 21, 2025

    @owlstronaut

    #8770 will be the dependency update for this

  5. self-assigned this
    on Nov 21, 2025
  6. dtma007 commented on Nov 21, 2025

    @dtma007

    @owlstronaut Thanks for the quick response! Sorry, I'm not familiar with the release process. Is there a rough ETA on when a new npm release will be available with the updated glob version? Thanks again!

  7. owlstronaut commented on Nov 21, 2025

    @owlstronaut

    @owlstronaut Thanks for the quick response! Sorry, I'm not familiar with the release process. Is there a rough ETA on when a new npm release will be available with the updated glob version? Thanks again!

    Hopefully next week before the holiday weekend. I'll be working with @wraithgar to try to get it out

  8. Andrea-Filice commented on Nov 22, 2025

    @Andrea-Filice

    tell me that a fix is coming soon, I've been freaking out for 3 days trying to figure out why the npm audit command gives me 2 high vulnerabilities.

  9. keptt commented on Nov 22, 2025

    @keptt
    Author

    Thanks @owlstronaut, appreciate that! Looking forward to the 11.6.4 release

  10. dtma007 commented on Nov 24, 2025

    @dtma007

    @owlstronaut Thanks for all your help! I just saw that the PR was approved: #8770 Any updates on the release availability?

  11. djeevan-intel commented on Nov 25, 2025

    @djeevan-intel

    Will the PR fix for npm cli v10?

  12. owlstronaut commented on Nov 25, 2025

    @owlstronaut

    @owlstronaut Thanks for all your help! I just saw that the PR was approved: #8770 Any updates on the release availability?

    Either today or tomorrow, I'll discuss with the team shortly

  13. dtma007 commented on Nov 25, 2025

    @dtma007

    @owlstronaut Thanks so much! That's awesome news. This will be a great help for us, especially if the release were made available today. We appreciate the efforts to get this fix out so quickly.

  14. arjunkgit commented on Jan 6, 2026

    @arjunkgit

    Will the PR fix for npm cli v10?

    Could someone clarify:

    • When npm 10.x will rebundle with glob@10.5.0 (patched)?
  15. shrvr commented on Jan 13, 2026

    @shrvr

    When npm 10.x will rebundle with glob@10.5.0 (patched)?

    @owlstronaut ^ Is it planned? Thanks.

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

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingNeeds Triageneeds review for next steps

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions