Skip to content

Shrinkwrap is forcing insecure dependencies #6731

Description

@isaacs

Describe the bug

Because this module ships with a shrinkwrap, it is impossible to avoid using the insecure braces@3.0.2, even using overrides.

Please either keep all dependencies up to date with security advisories, or remove the shrinkwrap from the deployment so that we can get security updates.

Steps to reproduce

  • npm install netlify-cli
  • npm audit

Observe that braces@3.0.2 is present in the tree, and cannot be overridden, due to the npm-shrinkwrap.json

Configuration

Not relevant.

Environment

System:
OS: macOS 14.5
CPU: (16) arm64 Apple M3 Max
Memory: 14.46 GB / 128.00 GB
Shell: 5.2.0 - /usr/local/bin/bash
Binaries:
Node: 20.13.1 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 10.7.0 - /usr/local/bin/npm
pnpm: 9.2.0 - /usr/local/bin/pnpm
bun: 1.1.6 - ~/bin/bun
npmPackages:
netlify-cli: ^17.29.0 => 17.29.0

Activity

  1. added
    type: bugcode to address defects in shipped code
    on Jun 24, 2024
  2. merlyn-at-netlify commented on Jul 11, 2024

    @merlyn-at-netlify

    Thanks, @isaacs. For context the impact is not very severe given the context that Netlify CLI runs in:

    Affected versions of this package are vulnerable to Uncontrolled resource consumption due improper limitation of the number of characters it can handle, through the parse function. An attacker can cause the application to allocate excessive memory and potentially crash by sending imbalanced braces as input.

    From: https://security.snyk.io/package/npm/braces/3.0.2

  3. isaacs commented on Jul 11, 2024

    @isaacs
    Author

    Yeah, it's more annoying than actually hazardous, for sure. But such is life in a world that incentivizes getting your name on a CVE more than it does the subtle nuance of actual security.

  4. G-Rath commented on Jul 26, 2024

    @G-Rath
  5. G-Rath commented on Sep 3, 2024

    @G-Rath

    there's now a new micromatch vulnerability that we cannot update due to the shrinkwrap: GHSA-952p-6rrq-rcjv

    cc @sarahetter

  6. added theissue type on Apr 23, 2025
  7. electrovir commented on Aug 29, 2025

    @electrovir

    This package has another vulnerability that I am unable to workaround because of npm-shrinkwrap.json: GHSA-52f5-9888-hmc6

    Please stop publishing this package with npm-shrinkwrap.json: I simply cannot use it.

  8. G-Rath commented on Oct 24, 2025

    @G-Rath

    Have opened #7741 about another downstream vulnerability that is blocked due to the shrinkwrap

  9. G-Rath commented on Nov 11, 2025

    @G-Rath

    ... and now the use of shrinkwrap is breaking npm ci because of platform constraints: #7769

  10. taylorreece commented on Nov 12, 2025

    @taylorreece
    Contributor

    Yeah... this shrinkwrap thing is getting pretty annoying. I'm awaiting a release that includes #7758 which was patched last week, but the currently available version is still shrinkwrapped to the old version of tar. With the shrinkwrap file, there's no way to npm audit --fix the vulnerability.

    Netlify team - any plans to remove the shrinkwrap file? NPM docs recommend against including it https://docs.npmjs.com/cli/v11/configuring-npm/npm-shrinkwrap-json

    It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates.

  11. serhalp commented on Nov 12, 2025

    @serhalp
    Member

    @taylorreece but note the previous sentence:

    The recommended use-case for npm-shrinkwrap.json is applications deployed through the publishing process on the registry: for example, daemons and command-line tools intended as global installs or devDependencies.

    This is exactly the use case we have with netlify-cli.

  12. serhalp commented on Nov 12, 2025

    @serhalp
    Member

    I'm awaiting a release that includes #7758 which was patched last week

    🤔 No release PR was created because Dependabot marked that as chore:. Let me look into that...

  13. isaacs commented on Nov 12, 2025

    @isaacs
    Author

    By the way, I actually have come to feel like this is now not "merely annoying", it is actually a security issue.

    If you use the netlify-cli as part of your deployment, you must have audit failures.

    So you come here, find out that it's no biggie, and start ignoring it.

    Now you ignore audit failures, and every time audit fails, you go "Oh, right, it's no big deal".

    Which it is, until it isn't.

  14. isaacs commented on Jan 25, 2026

    @isaacs
    Author

    This is an ever-growing problem. All my audit warnings are because I'm using netlify. It's a bad look! Just remove the shrinkwrap, there's no need for it.

    I have fixed several really bad security vulnerabilities recently in node-tar, and you're just not allowing your users to benefit from them.

  15. G-Rath commented on Jan 25, 2026

    @G-Rath

    Not to mention you're also punishing npm users for choosing to use npm, since other package managers ignore the shrink-wrap (and by extension proving the shrink wrap can't be that important).

    @isaacs I'm curious on how viable you think it would be to try and add a new .npmrc option to npm for having shrinkwraps ignored

  16. isaacs commented on Jan 26, 2026

    @isaacs
    Author

    @G-Rath I think shrinkwraps were a mistake, and npm should drop support for them in the next major.

    However, I no longer work on npm, so I have no more power to effect this than anyone else.

  17. G-Rath commented on Jan 27, 2026

    @G-Rath

    @isaacs thanks yeah I was asking if you would think it would be tons of work to change or really straightforward, based on what you can remember of how shrinkwrapping is implemented (I assume its not load bearing, but you never know...)

    I've created npm/cli#8938 to give us a place to discuss this in the more general npm context

  18. isaacs commented on Jan 27, 2026

    @isaacs
    Author

    Oh yeah, it'd be crazy easy to just stop doing shrink wraps. The hard part is just accepting the breaking change, but that's social, not technical.

  19. self-assigned this
    on Apr 16, 2026
  20. added a commit that references this issue on Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bugcode to address defects in shipped codetype: securitycode to address security issues

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions