Skip to content

Update fast-uri to patched 3.1.5 - #5208

Merged
Mike Harder (mikeharder) merged 2 commits into
mainfrom
copilot/fix-fast-uri-vulnerability
Aug 12, 2026
Merged

Update fast-uri to patched 3.1.5#5208
Mike Harder (mikeharder) merged 2 commits into
mainfrom
copilot/fix-fast-uri-vulnerability

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

fast-uri 3.1.4 is vulnerable to host confusion when backslashes introduce URI authorities, potentially causing policy and WHATWG URL consumers to resolve different hosts.

Changes

  • Updated the transitive Ajv dependency fast-uri from 3.1.4 to patched 3.1.5.
  • Removed all vulnerable 3.1.4 resolutions from pnpm-lock.yaml.

Reachability Assessment

  • Reachable — high confidence. AutoRest validates user-provided specifications using Ajv with ajv-formats and schemas containing uri/uri-reference formats.
  • Core URL-processing paths also use WHATWG URL, exposing the parser-consumer mismatch described by GHSA-7p8r-x3mc-p8w7.
Original prompt

This section details the Dependabot vulnerability alert you should resolve

<alert_title>fast-uri vulnerable to host confusion via backslash authority introducer</alert_title>
<alert_description>### Impact

fast-uri v4.1.1 and earlier require a literal // to recognize a URI authority, so a reference that uses \\, /\, or \/ as the authority introducer (in place of //, after an optional scheme) is parsed with no authority: the sequence and everything after it fold into the path. Node's native WHATWG URL (used by fetch(), undici, and Node's http/https clients) instead treats \ as interchangeable with / for special schemes (http, https, ws, wss, ftp, file), so the two parsers extract different hosts from the same input.

For example, fast-uri resolves \\evil.com/path against base https://allowed.com/ to https://allowed.com/%5C%5Cevil.com/path (confined to the trusted host), while Node's WHATWG URL resolves the same reference to https://evil.com/path.

Applications that use fast-uri to enforce host-based policy (allowlists, denylists, loopback/SSRF filtering, redirect validation, outbound proxy routing) before passing the same URL into Node's URL or fetch() consumers see a policy/use desync and can be steered to an unintended destination.

Patches

Upgrade to fast-uri v4.1.2, v3.1.5, v2.4.4.

Workarounds

None. Upgrade to the patched version.</alert_description>

high
GHSA-7p8r-x3mc-p8w7, CVE-2026-18446
fast-uri
npm
<vulnerable_versions>3.1.4</vulnerable_versions>
<patched_version>3.1.5</patched_version>
<manifest_path>pnpm-lock.yaml</manifest_path>

https://github.com/fastify/fast-uri/security/advisories/GHSA-7p8r-x3mc-p8w7 https://nvd.nist.gov/vuln/detail/CVE-2026-18446 https://github.com/fastify/fast-uri/commit/f3c6c905f47831007490f466c5945012e905cc52 https://cna.openjsf.org/security-advisories.html https://github.com/fastify/fast-uri/releases/tag/v4.1.2 https://github.com/advisories/GHSA-7p8r-x3mc-p8w7

<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 c...

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix fast-uri vulnerability alert for host confusion Update fast-uri to patched 3.1.5 Aug 12, 2026
@mikeharder
Mike Harder (mikeharder) marked this pull request as ready for review August 12, 2026 02:07
@azure-pipelines

Copy link
Copy Markdown

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/25tngf4f For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/28dxnqjz For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/25tngf4f --use:https://tinyurl.com/28dxnqjz

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/25tngf4f"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/28dxnqjz"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

@mikeharder
Mike Harder (mikeharder) enabled auto-merge (squash) August 12, 2026 02:27
@mikeharder
Mike Harder (mikeharder) merged commit bb3b740 into main Aug 12, 2026
11 checks passed
@mikeharder
Mike Harder (mikeharder) deleted the copilot/fix-fast-uri-vulnerability branch August 12, 2026 02:50
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