fix: bump fast-uri to >=3.1.1 in android/ and ios/#57
Open
abhinvv1 wants to merge 1 commit into
Open
Conversation
Patches GHSA-q3j6-qgpj-74h6 — fast-uri <=3.1.0 decoded percent-encoded dot segments (%2E, %2F) before applying dot-segment removal in normalize() and equal(), letting attacker-controlled paths like http://example.com/public/%2e%2e/admin collapse to http://example.com/admin and bypass path-based policy checks. fast-uri is a transitive dep of ajv (used here through the jest + browserstack-node-sdk stack). Added a fast-uri >=3.1.1 entry to the existing overrides block in both android/package.json and ios/package.json; npm install resolved both lockfiles to 3.1.2. Verified locally: - normalize('http://example.com/public/%2e%2e/admin') -> http://example.com/public/%2E%2E/admin (no longer decoded) - equal(a, b) -> false (was true on 3.0.3) - Real ../ dot-segments still collapse correctly (no regression) - ajv compiles schemas with $ref resolution against fast-uri@3.1.2 - browserstack-node-sdk + jest load cleanly in both subdirs Note: Dependabot already raised PRs #51 (/ios) and #52 (/android) for the same bump; this PR consolidates both into a single AAP-tracked change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
fast-uri<= 3.1.0 path-traversal via percent-encoded dot segments (Jira: AAP-19079)."fast-uri": ">=3.1.1"to the existingoverridesblock in bothandroid/package.jsonandios/package.json;npm installresolves both lockfiles tofast-uri@3.1.2./iosand Bump fast-uri from 3.0.3 to 3.1.2 in /android #52 for/android) into a single AAP-tracked change so the ticket can be closed cleanly.Vulnerability
On
fast-uri3.0.3 (current),normalize()andequal()decode%2e/%2Fbefore applying dot-segment removal, sohttp://example.com/public/%2e%2e/admincollapses tohttp://example.com/admin. Apps that compare normalized URLs to enforce path-based policy can be bypassed. Patched in 3.1.1.Impact area
fast-uriis a transitive dep only — pulled in byajv(used byjestandbrowserstack-node-sdk). Touched code path in this repo: schema$refresolution at test runtime.Test plan
fast-uri@3.1.2resolved in bothandroid/package-lock.jsonandios/package-lock.json(no nested old copies)equal('http://example.com/public/%2e%2e/admin', 'http://example.com/admin')→false(wastrueon 3.0.3)normalize()no longer decodes%2e%2einto..../dot-segments still collapse correctly (no regression)ajvcompiles a schema with$refresolution against the new fast-uri — worksbrowserstack-node-sdk(1.53.5) andjest(27.5.1) load cleanly in both subdirssemgrep/ci+ CodeQL after mergeRelated
/ios) — supersedes/android) — supersedes🤖 Generated with Claude Code