Skip to content

fix: restore open-url browser links while respecting CVE-2025-11953 - #2814

Merged
thymikee merged 1 commit into
mainfrom
codex/fix-open-url-browser-links
Jun 25, 2026
Merged

fix: restore open-url browser links while respecting CVE-2025-11953#2814
thymikee merged 1 commit into
mainfrom
codex/fix-open-url-browser-links

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Fixes#2812 by replacing the ESM-only strict-url-sanitise dependency in /open-url with local URL validation that preserves normal React Native welcome-screen links while rejecting Windows shell metacharacter payloads.

Removes the dependency from cli-server-api and refactors the middleware tests around a reusable request helper.

Validation

  • yarn build
  • yarn test packages/cli-server-api/src/__tests__/openURLMiddleware.test.ts --runInBand -u
  • Verified against /Users/thymikee/Developer/RNCLI83: https://reactnative.dev/docs/tutorial returned 200 and opened Safari; https://evil.com?|calc.exe and https://example.com/?a=%¾TA% returned 400.

@thymikee

thymikee commented Jun 25, 2026

Copy link
Copy Markdown
MemberAuthor

Checked this against the 20.1.1 security change from #2758. This PR keeps the same regression coverage for CVE-2025-11953: non-string URLs are rejected, and the three attack vectors from #2758 are still rejected with 400: invalid hostname command substitution (https://www.$(calc.exe).com/foo), Windows pipe separator (https://evil.com?|calc.exe), and env-var expansion/exfiltration (https://example.com/?a=%¾TA%). The focused middleware test passes with those cases plus the React Native welcome-screen links.

@thymikee
thymikee marked this pull request as ready for review June 25, 2026 14:20
@thymikee
thymikeeforce-pushed the codex/fix-open-url-browser-links branch from a04ee31 to 2233857CompareJune 25, 2026 14:34
@thymikee
thymikeeforce-pushed the codex/fix-open-url-browser-links branch from 2233857 to 7771736CompareJune 25, 2026 14:41
@thymikeethymikee changed the title fix: restore open-url browser linksfix: restore open-url browser links while respecting CVE-2025-11953Jun 25, 2026
@thymikee
thymikee merged commit 903b3c5 into mainJun 25, 2026
8 checks passed
@thymikee
thymikee deleted the codex/fix-open-url-browser-links branch June 25, 2026 14:47
leotm added a commit to leotm/react-native-template-new-architecture that referenced this pull request Jun 30, 2026
- revert d1b5e9c patch fix
- bump @react-native-community/cli
- bump @react-native-community/cli-platform-android
- bump @react-native-community/cli-platform-ios
Resolve: #1994
Supersedes
- #1980
- #2012
- #2013
Ref
- react-native-community/template#231
- react-native-community/template#232
- react/react-native#57344
Includes URL sanitisation fix (v20.1.1 regression)
- react-native-community/cli#2814
- react-native-community/cli#2812
- react-native-community/cli#2758
- react-native-community/cli#2735
- react-native-community/cli#2697
leotm added a commit to leotm/react-native-template-new-architecture that referenced this pull request Jun 30, 2026
- revert d1b5e9c patch fix
- bump @react-native-community/cli
- bump @react-native-community/cli-platform-android
- bump @react-native-community/cli-platform-ios
Resolve: #1994
Supersedes
- #1980
- #2012
- #2013
Ref
- react-native-community/template#231
- react-native-community/template#232
- react/react-native#57344
Includes URL sanitisation fix (v20.1.1 regression)
- react-native-community/cli#2814
- react-native-community/cli#2812
- react-native-community/cli#2758
- react-native-community/cli#2735
- react-native-community/cli#2697
Sign up for freeto 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.

URLs unable to open since v20.1.1

1 participant

@thymikee