Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[v2] @modelcontextprotocol/server 2.4.0 inlines fast-uri 3.1.8, which has 4 advisories published 2026-10-23

未关闭 适合新手
#3,109 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
71/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
backend, security

调研方向

从 packages/server/tsdown.config.ts 和 pnpm-lock.yaml 开始,然后检查服务器 bundle 如何包含 ajv 和 fast-uri。将解析后的 fast-uri 版本更新到 3.1.9 或更高版本,并检查打包输出是否使用该版本。完成标准是 release bundle 不再包含 fast-uri 3.1.8;issue 中的复现命令展示了检查方法。

由索引模型根据 Issue 内容生成。

描述

v2
What happened?

Thanks for #3083 and 2.4.0: the bundled copy is now fast-uri 3.1.8, which clears the nine advisories in #2966.

On 2026-10-23, after 2.4.0 was published, GitHub published four more fast-uri advisories that affect 3.1.8 and are fixed in 3.1.9 (published 2026-10-19):

  • GHSA-w74x-v6f9-j3xg (medium): URI scheme spoofing via percent-encoded scheme decoding
  • GHSA-wjr9-j795-jxcr (medium): host confusion via unchecked WHATWG host canonicalization
  • GHSA-xhq7-xmqj-769h (low): improper path equivalence in relative reference normalization
  • GHSA-333x-w4r6-6crp (low): scheme injection via an unescaped first-segment colon in suffix references

As in #2966, ajv and its fast-uri are inlined into dist/ (noExternal in packages/server/tsdown.config.ts), so consumers cannot raise them with overrides or resolutions, and lockfile scanners do not see them. pnpm-lock.yaml on main still resolves [email protected].

We have not checked whether any of these advisories is reachable through the SDK's use of ajv.

What did you expect?

A release whose bundled fast-uri is 3.1.9 or later.

Code to reproduce
npm pack @modelcontextprotocol/[email protected]
tar xzf modelcontextprotocol-server-2.4.0.tgz
grep -ho '#region ../../node_modules/.pnpm/[^/]*/' package/dist/*.mjs | sort -u
# prints, among others, .pnpm/[email protected]/ and .pnpm/[email protected]/
SDK version

@modelcontextprotocol/server 2.4.0

Area

Server

主要语言
TypeScript
星标
13.7k
派生
2.3k
平均合并
1 天 2 小时
30 天内合并 PR
60

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/typescript-sdk 的其他 Issue

查看 modelcontextprotocol/typescript-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。