Fix fast-uri cve issues - #259
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR remediates fast-uri CVE issues by forcing the transitive fast-uri dependency to resolve to a patched 3.x version via pnpm overrides, and by updating the lockfile so ajv@8.20.0 uses fast-uri@3.1.3.
Changes:
- Added
fast-uri: "^3.1.2"to pnpm overrides in bothpnpm-workspace.yamlandpackage.json. - Updated
pnpm-lock.yamlto record the override and resolvefast-urifrom3.1.0to3.1.3(including snapshot references).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds a documented pnpm override to enforce a patched fast-uri version. |
| package.json | Adds fast-uri to pnpm.overrides (the repo’s consumed override source). |
| pnpm-lock.yaml | Records the override and updates resolution/snapshots to fast-uri@3.1.3. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Rick Brighenti (rbrighenti)
approved these changes
Jul 16, 2026
Beka Arevadze (BekaAre)
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security: force transitive
fast-urito patched3.1.3Summary
Pins the transitive dependency
fast-urifrom the vulnerable3.1.0to the patched3.1.3using a pnpmoverridesentry, remediating two URI-normalizationvulnerabilities.
fast-uriis not a direct dependency — it is pulled in through:Motivation
fast-uri@3.1.0is affected by two advisories, and the resolved version falls inside thevulnerable range of both:
fast-uri <= 3.1.1, fixed in 3.1.2) —percent-encoded authority delimiters (
%40→@,%3A→:) are decoded inside thehost and re-serialized as raw characters, so
http://trusted.com%40evil.com/normalizesto
http://trusted.com@evil.com/(host becomesevil.com). Can defeat hostallowlist / redirect / SSRF-style checks that normalize before validating.
fast-uri <= 3.1.0, fixed in 3.1.1) —%2Fand%2Eare decoded before dot-segment removal innormalize()/equal(), sohttp://example.com/public/%2e%2e/admincollapses tohttp://example.com/admin. Candefeat path-based policy checks.
ajvusesfast-urito validate theuri/uri-referencestring formats, which is theexact normalization surface described above.
What changed
fast-uri: "^3.1.2"entry to theoverrides:block."fast-uri": "^3.1.2"topnpm.overrides(the block pnpm actually consumes in this repo — see note below).fast-uri3.1.0 → 3.1.3(resolution + integrity + both snapshot references) and the override recorded in the lockfileoverrides:block.Net diff for the manifests + lockfile is 14 insertions / 4 deletions — no unrelated
packages touched.
Approach & rationale (chosen for maintainability)
(
@modelcontextprotocol/sdk@1.29.0,ajv@8.20.0) are already at their latest publishedversions, and the latest
ajvstill declaresfast-uri: ^3.0.1. There is no parent bumpavailable, so a version floor is required. The override is a documented guardrail that
prevents any future resolution from sliding back below the patched release. This matches
the repository's existing convention for the
@isaacs/brace-expansionoverride.^3.1.2:3.1.2is the fix boundary that covers both advisories. The caretstays inside
ajv@8'sfast-uri: ^3.0.1requirement (so4.xis intentionally excluded)and currently resolves to the newest in-range patch,
3.1.3.overrides:block reflectspackage.json'spnpm.overridesin this repo (it containshono, which only exists inpackage.json, and omits@isaacs/brace-expansion, which only exists inpnpm-workspace.yaml). To guarantee the fix is effective and stay consistent with theexisting dual-declared overrides (
zod,uuid,@types/uuidare already in both), theentry was added to both files. The
pnpm-workspace.yamlentry also carries theexplanatory comment for future maintainers.
pnpm installin the buildenvironment rewrites every tarball URL/integrity to an internal Azure Artifacts mirror
(
*.pkgs.visualstudio.com, sha1), which must not land in this public repo. Only the fourfast-urientries were changed, preserving the publicregistry.npmjs.org+sha512format for all other packages. The
3.1.3sha512integrity was verified by hashing thepackage tarball and cross-checking its
sha1against the registry value.Verification
fast-uri@3.1.0no longer appears anywhere inpnpm-lock.yaml; it resolves to3.1.3.fast-urilines + the override entry (nointernal-feed URL leakage, no unrelated churn).
pnpm install --frozen-lockfile --lockfile-only→ exit 0 in ~350 ms, i.e. thelockfile is consistent with the manifests and CI's frozen install will pass.
3.1.3sha512integrity independently reproduced from the tarball bytes(
sha1cross-check matched the registry hash exactly).Reviewer sanity check:
Risk & compatibility
ajv's declared^3.0.1range; only patch-level behaviorof
fast-urichanges. No API surface change.Rollback / follow-up
fast-uri@3.1.0in the lockfile and removes theoverride entries).
@modelcontextprotocol/sdk/ajvship releases that already resolvea patched
fast-uri, the override can be removed and the lockfile re-resolved.auditConfig.ignoreCves/ignoreGhsas— a real patched releaseexists, so upgrading is the correct action.
Checklist
^3.0.1)--frozen-lockfilepasses)pnpm auditre-run in CI to confirm the advisories clear