Command injection in React Native CLI allows remote attackers to perform remote code execution by sending HTTP requests.
@react-native-community/cli-server-api
[4.8.0,20.0.0)
The Metro Development Server, which is opened by the React Native 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.
Assuming the Metro Development Server is running on metro-server-host on port 8081 - 
curl -X POST http://metro-server-host:8081/open-url -H "Content-Type: application/json" -d "{\"url\":\"cmd /c echo abc ^> c:\\temp\\poc.txt\"}"
For improved security, or if upgrading is not possible, prefer binding the development server to the localhost interface explicitly, by including the “--host 127.0.0.1” flag, per the examples below -
npx react-native start --host 127.0.0.1
npx react-native-community/cli start --host 127.0.0.1