Skip to content

refactor: Bump fast-uri from 3.1.8 to 3.1.9 - #3511

Merged
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:refactor/fast-uri-3.1.9
Oct 27, 2026
Merged

mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:refactor/fast-uri-3.1.9

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Closes #3504

Replaces the Dependabot PR with a lock file regenerated on the current alpha. Only the fast-uri entry changes. Dependabot's lock also removed the optional peer entries gcp-metadata 7.0.1 and its nested gaxios 7.3.1; this PR keeps them.

fast-uri is a transitive development dependency: webpack → schema-utils 4.3.3 → ajv 8.18.0 (also via ajv-formats 2.1.1 → ajv 8.18.0). It is not in the production dependency tree (npm ls fast-uri --omit=dev is empty).

Changes

  • 3.1.9 (security release of the 3.x line):
    • Fixed URI scheme spoofing via percent-encoded schemes (GHSA-w74x-v6f9-j3xg, CVE-2026-110306, medium). A scheme containing a percent-encoding, such as %6Aavascript:, is no longer decoded into a live javascript: scheme. parse() now reports URI scheme is malformed., and serialize() and resolve() throw.
    • Fixed host confusion via unchecked WHATWG host canonicalization (GHSA-wjr9-j795-jxcr, CVE-2026-110180, medium). For the domain-host schemes http, https, ws and wss, a host containing an ASCII control character, space, DEL, a backtick or any of "#/:<>?@[\]^{|} is now rejected with URI host is malformed. (a parse() error; resolve() throws). The same applies to a host that the WHATWG URL parser does not read entirely as a host. Before, such hosts were silently rewritten: http://a@b@evil.example/ became host evil.example, and TAB, CR and LF were stripped.
    • Fixed improper path equivalence in relative-reference normalization (GHSA-xhq7-xmqj-769h, CVE-2026-110095, low). For a relative-path reference without scheme or authority, dot-segment removal now keeps unresolvable leading .. segments and never makes the path root-relative. For example, a/../b is now b instead of /b, and ../x stays ../x instead of x. A result that would be empty, start with //, or have a colon in its first segment is prefixed with ./. resolve() applies the same rule when the base URI has neither scheme nor authority.
    • Fixed scheme injection via an unescaped first-segment colon in suffix references (GHSA-333x-w4r6-6crp, CVE-2026-110725, low). With the non-default option reference: 'suffix', a colon in the first path segment of a reference without authority is now escaped, so the output cannot be reparsed as a scheme.
    • serialize() now re-applies path encoding (serializePathEncoding) to a reference without scheme and authority even when skipEscape is set, which is the mode resolve() uses to serialize its result. 3.1.8 skipped this step under skipEscape. The step percent-encodes every character outside the RFC 3986 path character set, and a colon in the first path segment.
    • Docs: noted the authority ambiguity of suffix references in the README.
    • CI: enabled trusted publishing releases for the v3.x branch (ci: enable trusted publishing releases (v3.x) fastify/fast-uri#229).

This fixes the Dependabot alerts for all four advisories above.

Impact on this project

ajv 8.18.0 calls only parse(), serialize() and resolve() of fast-uri, to resolve schema $id and $ref values. It never calls normalize() or equal(), and never uses reference: 'suffix'. schema-utils, ajv-formats and ajv-keywords do not use fast-uri directly.

Both versions were compared empirically through the real schema-utils 4.3.3 → ajv 8.18.0 call path. ajv compiles and validates differently only under these conditions:

  • Dot segments against a base without scheme or authority: the schema has no $id or a relative one, and the relative path of a $ref or nested $id has dot segments that reach the start of the merged path. That means leading .. segments that cannot be collapsed, .. segments that remove the first segment (a/../b), a path that reduces to nothing (.), or a colon in the first segment after ./ (./a:b). The ref now resolves per RFC 3986 instead of being made root-relative, losing its leading .. segments, or exposing the colon as a scheme. Dot segments elsewhere resolve as before. For example, with $id: "dir/root.json", $ref: "../other.json" resolved to /other.json (MissingRefError) and now resolves to other.json. With $id: "root.json", $ref: "a/../b" resolved to /b and now resolves to b.
  • Percent-encoded scheme in a $id or $ref: for example, $id: "%6Aavascript:alert(1)" compiled before (decoded to javascript:). Compilation now throws URI scheme is malformed.
  • Malformed http, https, ws or wss host in a $id or $ref: compilation throws URI host is malformed. when ajv resolves a $ref against, or to, a URI whose host matches the rejected forms above. For example, $id: "http://a@b@evil.example/s.json" with a $ref compiled before, with the host rewritten to evil.example.

No development-tooling schema uses the percent-encoded-scheme or malformed-host forms, and none of the 44 schema files checked has an $id. The files checked are those of webpack 5.106.2, terser-webpack-plugin 5.4.0, css-loader 7.1.5, style-loader 3.3.1, sass-loader 16.0.7 and babel-loader 10.1.1.

Dot-segment refs without an $id appear in 11 webpack plugin schema files (../../WebpackOptions.json#/definitions/... and ./ModuleFederationPlugin.json#/...). Their target is never registered with ajv, so they fail with the same MissingRefError message in both versions; only the error's internal missingRef value changes. webpack compiles only two of them (JsonModulesPluginParser.json and JsonModulesPluginGenerator.json), and only when its precompiled check rejects module.parser.json or module.generator.json options. This project does not set those options.

The re-applied path encoding in resolve() has no observable effect here. parse() already percent-encodes characters outside the path character set (normalizePathEncoding), and resolve() parses both of its inputs that way, so the step finds nothing left to encode. resolve() returned identical results in both versions for every such character tested: space, ", <, >, \, ^, backtick, {, }, |, [, ], a control character, non-ASCII characters and emoji, and malformed %. The bases tested were "", dir/schema.json and https://example.com/a/b.json. In the reachable schemas, the only $ref values with a path are ../../WebpackOptions.json and ./ModuleFederationPlugin.json, which contain only unreserved characters, . and /. All other $ref values are fragment-only (#/definitions/...), and no schema has an $id.

Validation results, including the full error messages, are identical between 3.1.8 and 3.1.9 for:

  • the css-loader, style-loader, sass-loader and babel-loader option schemas, with this project's loader options and with invalid options
  • the terser-webpack-plugin options schema, with webpack's production defaults and with invalid options
  • webpack's WebpackOptions.json, with a configuration like this project's and with an invalid one
  • webpack's in-memory asset, CSS and JSON parser and generator schemas

Breaking Changes

None

Code Changes Required

None — the upgrade is a drop-in replacement.

Summary by CodeRabbit

  • Chores
    • Updated a dependency to a newer patch version.

@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a4fe76b6-3209-4d58-96d4-365cd53662c9
Commits

Reviewing files that changed from the base of the PR and between 6861800 and 3c80f78.

Files selected for processing: 1
  • package-lock.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The lockfile updates fast-uri from version 3.1.8 to 3.1.9. It also updates the package’s registry URL and integrity hash.

Changes: fast-uri Dependency Update

Layer / File(s) Summary
Update fast-uri lockfile entry
package-lock.json
The lockfile now resolves fast-uri to version 3.1.9 and records its corresponding registry URL and integrity hash.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 3c80f

The dependency update is limited to the intended fast-uri lockfile entry and is ready to merge.

Pre-merge checks: Passed 6
Check name Status Explanation
Title check Passed The title begins with the required prefix "refactor:" and the first letter after the prefix is capitalized ("Bump"). It accurately describes the change, which bumps fast-uri from 3.1.8 to 3.1.9 in the…
Linked Issues check Passed Issue #3504 requires fast-uri 3.1.9. The whole-PR diff changes node_modules/fast-uri in package-lock.json from 3.1.8 to 3.1.9 and updates its registry URL and integrity hash. This brings the fou…
Out of Scope Changes check Passed The whole-PR diff contains only the fast-uri lockfile entry. The change updates the dependency version, resolved package, and integrity hash. No unrelated source, configuration, or dependency change…
Security Check Passed PASS. The pull request changes only package-lock.json. It replaces fast-uri 3.1.8 with 3.1.9 using the npm registry URL and a new integrity hash. The package remains development-only, and all othe…
Engage In Review Feedback Passed The current review produced zero actionable findings, and no posted review threads were returned. Therefore, no review feedback required engagement, implementation, or discussion.
Description check Passed The description clearly identifies issue #3504, explains the lockfile-only approach, documents the security fixes and project impact, and states testing and compatibility results. It does not use the …
Full details: Title check

Explanation

The title begins with the required prefix "refactor:" and the first letter after the prefix is capitalized ("Bump"). It accurately describes the change, which bumps fast-uri from 3.1.8 to 3.1.9 in the lockfile. The title is specific and matches the changeset and the linked issue #3504.

Full details: Linked Issues check

Explanation

Issue #3504 requires fast-uri 3.1.9. The whole-PR diff changes node_modules/fast-uri in package-lock.json from 3.1.8 to 3.1.9 and updates its registry URL and integrity hash. This brings the four upstream security fixes into the dependency tree. No project code change is required for this dependency-only objective.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff contains only the fast-uri lockfile entry. The change updates the dependency version, resolved package, and integrity hash. No unrelated source, configuration, or dependency changes are present.

Full details: Security Check

Explanation

PASS. The pull request changes only package-lock.json. It replaces fast-uri 3.1.8 with 3.1.9 using the npm registry URL and a new integrity hash. The package remains development-only, and all other lockfile entries are unchanged. The supplied release notes identify 3.1.9 as the security release for the four referenced URI vulnerabilities. No new application code or problematic security pattern was introduced.

Full details: Description check

Explanation

The description clearly identifies issue #3504, explains the lockfile-only approach, documents the security fixes and project impact, and states testing and compatibility results. It does not use the template headings or include the optional task checkboxes, but the required information is present and complete.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mtrezza
mtrezza merged commit ffa89d2 into parse-community:alpha Oct 27, 2026
11 checks passed
@mtrezza
mtrezza deleted the refactor/fast-uri-3.1.9 branch October 27, 2026 20:54
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.3.0-alpha.15

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Nov 2, 2026
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 10.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants