Skip to content
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

Security issue in dependency module nise #2610

Closed
pascalverlinden opened this issue Sep 10, 2024 · 3 comments
Closed

Security issue in dependency module nise #2610

pascalverlinden opened this issue Sep 10, 2024 · 3 comments

Comments

@pascalverlinden
Copy link

Describe the bug

sinon 18.0.0 seems to depend on nise ^6.0.0 which in turn uses path-to-regexp 6.2.2. which has a security issue.
Trying to fix this with npm audit fix --force installs sinon@2.4.1 which in turn uses a version of path-to-regexp with the same vulnerability. Running audit fix again tries to fix it by installing sinon 18.0.0 so you are back where it started.

To Reproduce
Steps to reproduce the behavior:

use a package.json with a dependency on sinon 18.0.0
npm install
npm audit should output something like:

path-to-regexp  0.2.0 - 7.2.0
Severity: high
path-to-regexp outputs backtracking regular expressions - https://github.com/advisories/GHSA-9wv6-86v2-598j
fix available via `npm audit fix --force`
Will install sinon@2.4.1, which is a breaking change
node_modules/nise/node_modules/path-to-regexp
  nise  *
  Depends on vulnerable versions of path-to-regexp
  node_modules/nise
    sinon  >=3.0.0
    Depends on vulnerable versions of nise
    node_modules/sinon

3 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Context (please complete the following information):

- Sinon version : 18.0.0
- Runtime: node 20.17.0, docker container running Debian GNU/Linux 12 (bookworm)
@allanpoppe2
Copy link

+1

@fatso83
Copy link
Contributor

fatso83 commented Sep 10, 2024

Already has a PR to fix this in nise: sinonjs/nise#226 (review)

Just awaiting some feedback before merging. Once done, I'll update the lock files for Sinon.

@fatso83
Copy link
Contributor

fatso83 commented Sep 10, 2024

Closed by publishing Sinon 18.0.1

@fatso83 fatso83 closed this as completed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants