Skip to content

fix: bump fast-uri to >=3.1.1 in android/ and ios/#57

Open
abhinvv1 wants to merge 1 commit into
mainfrom
AAP-19079_fix_fast_uri_vuln
Open

fix: bump fast-uri to >=3.1.1 in android/ and ios/#57
abhinvv1 wants to merge 1 commit into
mainfrom
AAP-19079_fix_fast_uri_vuln

Conversation

@abhinvv1
Copy link
Copy Markdown
Collaborator

@abhinvv1 abhinvv1 commented May 14, 2026

Summary

Vulnerability

On fast-uri 3.0.3 (current), normalize() and equal() decode %2e / %2F before applying dot-segment removal, so http://example.com/public/%2e%2e/admin collapses to http://example.com/admin. Apps that compare normalized URLs to enforce path-based policy can be bypassed. Patched in 3.1.1.

Impact area

fast-uri is a transitive dep only — pulled in by ajv (used by jest and browserstack-node-sdk). Touched code path in this repo: schema $ref resolution at test runtime.

Test plan

  • fast-uri@3.1.2 resolved in both android/package-lock.json and ios/package-lock.json (no nested old copies)
  • CVE PoC against the installed version: equal('http://example.com/public/%2e%2e/admin', 'http://example.com/admin')false (was true on 3.0.3)
  • normalize() no longer decodes %2e%2e into ..
  • Real ../ dot-segments still collapse correctly (no regression)
  • ajv compiles a schema with $ref resolution against the new fast-uri — works
  • browserstack-node-sdk (1.53.5) and jest (27.5.1) load cleanly in both subdirs
  • CI green on semgrep/ci + CodeQL after merge

Related

🤖 Generated with Claude Code

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>
@abhinvv1 abhinvv1 changed the title fix(AAP-19079): bump fast-uri to >=3.1.1 in android/ and ios/ fix: bump fast-uri to >=3.1.1 in android/ and ios/ May 14, 2026
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.

1 participant