Bump fast-uri to 3.1.2 to fix path traversal (GHSA-q3j6-qgpj-74h6)#15908
Merged
Conversation
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update fast-uri to version 3.1.1 to resolve vulnerability
Bump fast-uri to 3.1.2 to fix path traversal (GHSA-q3j6-qgpj-74h6)
Jun 4, 2026
mikeharder
reviewed
Jun 4, 2026
| "dependencies": { | ||
| "@azure-tools/typespec-client-generator-cli": "0.32.1" | ||
| }, | ||
| "overrides": { |
Member
There was a problem hiding this comment.
@copilot: can we revert the override and just bump in package-lock.json?
Contributor
Author
There was a problem hiding this comment.
Done in 682fcaa — reverted the package.json override; fast-uri is now bumped directly in package-lock.json (3.1.0 → 3.1.2). npm audit reports 0 vulnerabilities.
…json Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Contributor
|
The following pipelines have been queued for testing: |
mikeharder
requested changes
Jun 5, 2026
Member
mikeharder
left a comment
There was a problem hiding this comment.
blocking for eng/common update
mikeharder
approved these changes
Jun 5, 2026
This was referenced Jun 5, 2026
This was referenced Jun 5, 2026
azure-sdk-automation Bot
added a commit
to Azure/azure-sdk-for-js
that referenced
this pull request
Jun 5, 2026
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#15908 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
azure-sdk-automation Bot
added a commit
to Azure/azure-sdk-for-rust
that referenced
this pull request
Jun 5, 2026
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#15908 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
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.
Resolves the Dependabot alert for
fast-uripath traversal via percent-encoded dot segments (GHSA-q3j6-qgpj-74h6 / CVE-2026-6321), which let distinct URIs collapse onto the same normalized path innormalize()/equal().fast-uriwas a transitive dependency ofeng/common/tsp-clientresolving to the vulnerable3.1.0.Changes
package-lock.json:fast-uribumped directly from3.1.0to3.1.2(nopackage.jsonchanges).Version choice
The alert's patched version is
3.1.1, butfast-uri <=3.1.1is also flagged by a separate advisory (GHSA-v39h-62p7-jpjc).3.1.2is the lowest version free of all known advisories.npm auditreports 0 vulnerabilities.Reachability assessment
High confidence the update is low-risk and not an actively-exploited path.
fast-uriis transitive only (viaajv←@typespec/compiler←@azure-tools/typespec-client-generator-cli), used for JSON-schema validation. The repo never callsfast-uri'snormalize()/equal()nor performs attacker-controlled URL normalization or path-based policy enforcement, so the vulnerable path is not reachable. The bump primarily satisfies scanners.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>fast-uri vulnerable to path traversal via percent-encoded dot segments</alert_title>
<alert_description>### Impact
fast-uriv3.1.0 and earlier decodes percent-encoded path separators (%2F) and dot segments (%2E) before applying dot-segment removal innormalize()andequal(). This makes encoded path data behave like real/and.., so distinct URIs collapse onto the same normalized path.For example,
http://example.com/public/%2e%2e/adminnormalizes tohttp://example.com/admin, andequal()considers them the same URI.Applications that normalize or compare attacker-controlled URLs to enforce path-based policy can be bypassed. A path that looks confined under an allowed prefix can normalize to a different location.
Patches
Upgrade to
fast-uri>= 3.1.1.Workarounds
None. Upgrade to the patched version.</alert_description>
high
https://github.com/fastify/fast-uri/security/advisories/GHSA-q3j6-qgpj-74h6 https://nvd.nist.gov/vuln/detail/CVE-2026-6321 https://cna.openjsf.org/security-advisories.html https://github.com/advisories/GHSA-q3j6-qgpj-74h6GHSA-q3j6-qgpj-74h6, CVE-2026-6321
fast-uri
npm
<vulnerable_versions>3.1.0</vulnerable_versions>
<patched_version>3.1.1</patched_version>
<manifest_path>eng/common/tsp-client/package-lock.json</manifest_path>
<task_instructions>Resolve this alert by updating the affected package to a non-vulnerable version. Prefer the lowest non-vulnerable version (see the patched_version field above) over the latest to minimize breaking changes. Include a Reachability Assessment section in the PR description. Review the alert_description field to understand which APIs, features, or configurations are affected, then search the codebase for usage of those specific items. If the vulnerable code path is reachable, explain how (which files, APIs, or call sites use the affected functionality) and note that the codebase is actively exposed to this vulnerability. If the vulnerable code path is not reachable, explain why (e.g. the affected API is never called, the vulnerable configuration is not used) and note that the update is primarily to satisfy vulnerability scanners rather than to address an active risk. If the advisory is too vague to determine reachability (e.g. 'improper input validation' with no specific API named), state that reachability could not be determined and explain why. Include a confidence level in the reachability assessment (e.g. high confidence if the advisory names a specific API and you confirmed it is or is not called, low confidence if the usage is indirect and hard to trace). If no patched version is available, check the alert_description field for a Workarounds section — the advisory may describe configuration changes or usage patterns that mitigate the vulnerability without a version update. If a workaround is available, apply it and leave a code comment referencing the advisory identifier explaining it is a temporary mitigation. If neither a patch nor a workaround is available, explain in the PR description why the alert cannot be resolved automatically so a human reviewer can take over. Inspect the repository to determine which package manager is used (e.g. lock files, config files, build scripts) and use that tooling to perform the update — do not edit lock files directly. If the version constraint in the manifest (e.g. package.json, Gemfile, pyproject.toml) caps the version below the fix, update the constraint first. For transitive dependencies, determine whether it is simpler to update the direct dependency that pulls in the vulnerable package or to update the transitive dependency directly, and choose the least disruptive approach. If upgrading to fix the vulnerability forces a major version bump or known breaking changes, review the changelog or release notes, then audit the codebase for usage of affected APIs and fix any breaking changes that are found. If the package manager fails to resolve dependencies (e.g. peer dependency conflicts, incompatible engine constraints), document the error in the PR description rather than attempting increasingly complex workarounds. After updating, check the lock file to confirm the package no longer resolves to a version in the vulnerable range. Keep changes minimal and tightly scoped. Ensure tests, build, type checking, and linting all pass after your changes. If there are any test, lint, or typechecking failures, investigate whether they are caused by the update and fix them if so — do not leave broken tests in the PR. If they were already present before the update, note them in the PR description so a human reviewer can assess whether they are related.</task_instructions>