modelcontextprotocol / modelcontextprotocol/typescript-sdk

High-severity CVEs via pnpm audit

Open
#2,048 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug P2 ready for work
Dominant language
TypeScript
Stars
13.4k
Forks
2.2k
Avg merge
3d 15h
Merged PRs (30d)
4

Description

Describe the bug
Migration https://github.com/modelcontextprotocol/typescript-sdk/pull/1074 introduced vite as a mandatory peer dep of vitest. The currently locked vite@7.3.0 has two high-severity CVEs (https://github.com/advisories/GHSA-v2wj-q39q-566r, https://github.com/advisories/GHSA-p9ff-h696-f583), patched in ≥7.3.2. pnpm.overrides does not force the resolution for peer deps, so pnpm audit --audit-level=high fails on a clean checkout with no workaround short of adding vite as an explicit devDependency. Jest didn't have this problem — no bundler in the dep tree.

Technical details: https://github.com/modelcontextprotocol/typescript-sdk/issues/2042

To Reproduce
Steps to reproduce the behavior:

  1. Run pnpm audit --audit-level=high
  2. Outcome:
pnpm audit --audit-level=high
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ Vite: `server.fs.deny` bypassed with queries           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ vite                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=7.1.0 <=7.3.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.3.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ .>vitest>vite                                          │
│                     │                                                        │
│                     │ common__vitest-config>vite-tsconfig-paths>vite         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-v2wj-q39q-566r      │
└─────────────────────┴────────────────────────────────────────────────────────┘
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ Vite Vulnerable to Arbitrary File Read via Vite Dev    │
│                     │ Server WebSocket                                       │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ vite                                                   │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=7.0.0 <=7.3.1                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.3.2                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ .>vitest>vite                                          │
│                     │                                                        │
│                     │ common__vitest-config>vite-tsconfig-paths>vite         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-p9ff-h696-f583      │
└─────────────────────┴────────────────────────────────────────────────────────┘

Expected behavior
Fails = 0

Logs
Described in To Reproduce section above

Additional context
We expect to revert Jest, remove better-auth dependency from examples (reason is the same)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running pnpm audit --audit-level=high and inspect the dependency declarations, pnpm.overrides, and lockfile paths that resolve vitest to vite. Review the linked issue and the expected Jest reversion and example dependency removal. Done means a clean checkout reports zero high-severity audit findings without a manual workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
build-system, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.