Packages / @react-native-community/cli / Security
@react-native-community/cli has arbitrary OS command injection
Affected releases · @react-native-community/cli
- 19.x19.0.0 – 19.1.1Fixed in 19.1.2
- 18.x18.0.0Fixed in 18.0.1
On 19.x, the newest line:
npm install @react-native-community/cli@19.1.2Every release on a timeline
Not affected
21.0.0
1 release, latest
Affected
19.0.0 – 19.1.1
3 releases
Fixed
19.1.2
1 release
Affected
18.0.0
1 release
Fixed
18.0.1
1 release
What happens
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.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.