
package.jsonjq installedAll scripts must be executed from the root directory of the target project where the package.json file is located.
Run the Python script for reliable semantic version comparison:
python3 scripts/python/check_react_versions.py
Use this option if Node.js is available in the environment:
node scripts/javascript/check_react_versions.js
Recommended for Windows-based systems and servers:
.\scripts\powershell\Check-ReactVersions.ps1
Run the shell script. This requires jq for JSON parsing:
bash scripts/bash/check_react_versions.sh
Each script analyzes the React dependency version and returns one of the following statuses:
package.json file could not be located or parsedIf a script reports a VULNERABLE status, take immediate action:
Upgrade
Update the React dependency to a version outside the affected ranges.
Verify
Re-run the detection script after upgrading to confirm the project is no longer vulnerable.
These scripts are intended for detection and security validation purposes only. They do not exploit the vulnerability and should be used as part of a broader security assessment strategy.