Skip to content

fix(deps): pin mcp-server's fast-uri override to ^3.1.5, not an unbounded range (#2050) - #2051

Merged
vybe merged 2 commits into
devfrom
fix/fast-uri-override-major-bump
Aug 6, 2026
Merged

vybe merged 2 commits into
devfrom
fix/fast-uri-override-major-bump

Conversation

@trinity-ability

Copy link
Copy Markdown
Contributor

Fixes #2050

What

src/mcp-server/package.json declared its fast-uri override as ">=3.1.2" — unbounded, so it admits 4.x. The root package.json beside it uses a caret ("^3.1.4") and is correctly pinned to 3.x. That inconsistency is the entire bug.

Because of it, Dependabot security PR #2034 proposes fast-uri 3.1.2 → 4.1.2 — a major jump — while ajv, the only consumer in the tree, declares fast-uri: ^3.0.1. Even the latest published ajv (8.20.0) still declares ^3.0.1; no released ajv accepts v4. The override forces it there anyway, because that is what overrides do.

Why 3.1.5 is the right target, not 4.1.2

All three advisories are fixed on the 3.x line:

Advisory Severity 3.x fixed in
GHSA-4c8g-83qw-93j6 — host confusion via failed IDN canonicalization high 3.1.3
GHSA-v2hh-gcrm-f6hx — host confusion via literal backslash authority delimiter high 3.1.4
GHSA-7p8r-x3mc-p8w7 — host confusion via backslash authority introducer high 3.1.5

3.1.5 closes every one of them without leaving ajv's supported range. The major bump buys no additional security and spends compatibility for it.

This is also what root already does: #2032 took root's fast-uri to 3.1.5 and stayed in 3.x, precisely because its override is a caret.

Why CI would not have caught the alternative

The failure mode of forcing ajv onto fast-uri v4 is at runtime, in ajv's $ref URI resolution — not at build time. The mcp-server PRs carry no build or e2e check (e2e is CANCELLED/SKIPPED on them), so a break would have shipped green. v4.0.0 also carries a real type-surface change ("chore: removed types deprecated") and an escape-handling fix, so it is not a no-op.

Verification

fast-uri resolves to  3.1.5   (was 3.1.2)
ajv 8.18.0            ^3.0.1  satisfied
npm run build (tsc)   clean
npm test              170 passed, 0 failed
npm audit             fast-uri no longer listed

Diff is four lines: the override, and fast-uri's version/resolved/integrity in the lockfile. Nothing else moved.

Scope / follow-up

Targets dev per the SDLC, since this is a code change to the override rather than a Dependabot-generated lockfile bump.

Note the residual: main still carries mcp-server fast-uri 3.1.2, vulnerable to all three, until this releases. #2034 is left open rather than closed (closing makes Dependabot recreate it) and should be superseded by this. If the exposure warrants expediting, this is the commit to cherry-pick to main — not #2034.

The remaining npm audit findings on this tree (hono, ip-address, undici, @hono/node-server) are fixed by #2001 / #1972 / #1986 / #2000, which merged to main as Dependabot security PRs and reach dev on the next release back-merge.

🤖 Generated with Claude Code

…nded range (#2050)

The override was `">=3.1.2"`, which admits 4.x — so Dependabot's security PR
(#2034) proposed 3.1.2 -> 4.1.2 while `ajv`, the only consumer in the tree,
declares `fast-uri: ^3.0.1`. Even the latest published ajv (8.20.0) still
declares `^3.0.1`; no released ajv accepts v4, and an override forces it there
regardless.

All three advisories are fixed on the 3.x line — GHSA-4c8g-83qw-93j6 in 3.1.3,
GHSA-v2hh-gcrm-f6hx in 3.1.4, GHSA-7p8r-x3mc-p8w7 in 3.1.5 — so 3.1.5 closes
every one of them without leaving ajv's supported range. The major bump buys no
additional security and spends compatibility for it.

Uses a caret to match the root package.json's `"^3.1.4"`, which was already
correct; the two files disagreeing on override style is what let this through.

Verified: fast-uri resolves to 3.1.5, ajv 8.18.0's `^3.0.1` satisfied,
`npm run build` (tsc) clean, 170/170 mcp-server tests pass, and fast-uri no
longer appears in `npm audit`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving my own analysis is not the point here — the evidence is checkable and stands on its own:

  • [email protected] (latest published) still declares fast-uri: ^3.0.1; no released ajv accepts v4.
  • fast-uri 3.1.5 is the patched 3.x release for all three advisories (3.1.3 / 3.1.4 / 3.1.5 respectively), so the security outcome is identical to #2034's v4 jump.
  • Root package.json already used a caret for this exact package; only mcp-server's >= was unbounded, which is the whole reason Dependabot proposed a major there and 3.1.5 at root.

Verified after rebasing onto dev (which now carries #2003's fastmcp 4.12.2): fast-uri 3.1.5 and fastmcp 4.12.2 coexist, npm install --package-lock-only is a no-op so the lockfile is self-consistent, tsc builds clean, 170/170 mcp-server tests pass, and fast-uri no longer appears in npm audit.

Diff remains minimal — the override plus fast-uri's three lockfile fields.

@vybe
vybe enabled auto-merge (squash) August 6, 2026 13:54
@vybe
vybe merged commit c49f728 into dev Aug 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants