Repository navigation
chore(security): resolve pnpm audit vulnerabilities (4 high, 2 moderate) - #514
Conversation
Raise the floors of two existing pnpm overrides so the vulnerable ranges become unreachable rather than merely unselected by a stale lockfile. fast-uri >=3.1.5 <4 -> >=3.1.7 <4 (3.1.5 -> 3.1.7) Clears the 4 HIGH advisories pnpm audit reports (GHSA-5jgf-p345-68v8, GHSA-f65p-4m7j-42xc, GHSA-fph4-wmhf-6fwf, GHSA-jqff-g426-hqxp), plus two published 2026-09-02 that the npm audit DB has not ingested yet: GHSA-qw65-cvwx-89v3 (<3.1.7) and GHSA-58mr-gqgx-xq4g (=3.1.6). The floor is 3.1.7, not 3.1.6, because 3.1.6 is vulnerable to both. The <4 bound stays: ajv@8.20.0 declares fast-uri ^3.0.1. qs >=6.15.2 -> >=6.16.0 (6.15.3 -> 6.16.0) Clears GHSA-x5fp-wj9c-mxmx and GHSA-4mjr-xmp4-gh2g. Left unbounded to match the majority style in this block; qs has no 7.x, and both parents (express ^6.14.0, body-parser ^6.15.2) accept 6.16.0. Both packages reach the tree only via packages/mcp -> @modelcontextprotocol/sdk@1.30.0, which is already at npm latest, as are ajv and express - so no direct dependency or upstream release can carry the fix, leaving overrides as the only route. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013cxoouPsJYVipSmGtMmEi1
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughUpdated pnpm dependency overrides in Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The dependency override floors are updated and the lockfile resolves to the intended patched versions. No current merge-readiness risk is identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) Full details: Updates DocsExplanation PASS: This pull request is a security dependency update, not a feature implementation. The committed diff changes only Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
=======================================
Coverage 88.91% 88.91%
=======================================
Files 199 199
Lines 11313 11313
Branches 3178 3178
=======================================
Hits 10059 10059
Misses 1252 1252
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
pnpm auditwas failing CI (Audit - ProductionandAudit - All) with 6 advisories across 2 packages. Both are transitive-only and already had entries in rootpnpm.overrideswhose floors had gone stale — this raises both floors and refreshes the lockfile.fast-uriqsBoth reach the tree by exactly one route:
packages/mcp → @modelcontextprotocol/sdk@1.30.0 → {ajv, express} → {fast-uri, qs}.Changes
pnpm-lock.yamlmovesfast-uri@3.1.5 → 3.1.7(underajv@8.20.0) andqs@6.15.3 → 6.16.0(underexpress@5.2.1andbody-parser@2.3.0). The lockfile'soverrides:header block also gets re-sorted — that is pnpm normalising pre-existing drift against thesort-package-jsonordering, not a hand edit.Why overrides, and not a direct dependency or a plain lockfile bump
Consistency with how this repo has handled every prior audit failure (#454, #438, #434, #405, #387, #376 …): transitive vulnerabilities get a floor in root
pnpm.overrides, then a lockfile refresh.packages/mcp/package.jsondeclares neitherfast-uri/qsnorajv/express. Everything arrives through@modelcontextprotocol/sdk@1.30.0, which is already npmlatest, as areajv@8.20.0andexpress@5.2.1. There is no upstream release that pins a fixed version.ajv → fast-uri ^3.0.1,express → qs ^6.14.0,body-parser → qs ^6.15.2) already admit the patched versions, so a barepnpm updatewould resolve them. It was rejected because the old floors (>=3.1.5,>=6.15.2) still admit the vulnerable 3.1.5/3.1.6 and 6.15.3, so any future re-resolution could silently regress.Two decisions worth flagging
fast-urifloor is>=3.1.7, not the>=3.1.6the audit output implies. Two further HIGH advisories were published 2026-09-02 and are not yet in the npm audit DB — verified viagh api /repos/fastify/fast-uri/security-advisories:GHSA-qw65-cvwx-89v3— authority injection via an unvalidated port inserialize; vulnerable>=3.0.0 <3.1.7GHSA-58mr-gqgx-xq4g— host confusion via an unclosed bracket in the URI authority; vulnerable=3.1.6exactlyLanding on 3.1.6 would have cleared the audit today and re-broken it once the DB ingests these. The
<4bound stays becauseajv@8.20.0declaresfast-uri: ^3.0.1; pnpm overrides replace a parent's range rather than intersecting it, so dropping the bound would silently force an incompatible major with no error or warning.qsstays unbounded. It matches the majority style in the block (lodash,ws,hono,ajv,glob…), qs has no 7.x published, and both declaring parents accept 6.16.0.Reachability — hygiene, not an incident
Neither vulnerable code path is reachable from this repo's own execution paths:
qs:packages/mcp/src/server.tsconnects overStdioServerTransportonly.expressis never imported anywhere inpackages/*/src— it ships as a hard transitive dep of the SDK but is dead code here. No attacker-controlled query string or urlencoded body reachesqs.fast-uri:ajvuses it solely for schema-compile-time$id/$refresolution; instance data never reaches it (ajv-formatsimplementsformat: "uri"as a regex). The repo compiles no schema containing$ref/$id, and the SDK's only validator call site (elicitInputform mode) is never invoked frompackages/mcp/src.Worth keeping current regardless: an MCP client compiles schemas supplied by a remote server, which is a genuinely attacker-influenced path. This repo ships a server, so it doesn't apply today.
qs@6.16.0's array-limit tightening is gated behindthrowOnLimitExceeded, which neitherexpressnorbody-parsersets — so no parsing-behavior change on this path.fast-uri3.1.5→3.1.7 does contain real parsing/serialization changes, but only in the compile-time paths described above.Verification
All run locally on this branch:
pnpm auditNo known vulnerabilities found(exit 0)pnpm audit --prodNo known vulnerabilities found(exit 0)pnpm install --frozen-lockfilepnpm testpnpm typecheckpnpm buildpnpm biome:checkmainbaseline)pnpm prettier:checkpnpm license-checkOut of scope — flagged, not fixed
Assessment surfaced a pre-existing hazard unrelated to these advisories: several overrides are unbounded even though an incompatible higher major already exists on npm —
glob: ">=11.1.0"(latest 13.0.6),diff: ">=8.0.3"(latest 9.0.0),ajv: ">=8.18.0". Separately,undiciis pinned to6.28.0while@ai-sdk/provider-utils@4.0.45declares^5.29.0, and pnpm has already force-resolved that across a major (pnpm-lock.yaml). Since overrides replace rather than intersect ranges, each is one release away from a silent cross-major substitution. Deliberately left for a separate PR to keep this one audit-driven and small.🤖 Generated with Claude Code
https://claude.ai/code/session_013cxoouPsJYVipSmGtMmEi1
Summary by CodeRabbit