
React2Shell भेद्यता सत्यापन स्क्रिप्ट (React2Shell को CVE-2025-55182 के नाम से भी जाना जाता है)।
verify_react_vulnerability.py)यह एक सरल, स्वतंत्र Python स्क्रिप्ट है जिसे आपकी परियोजना में महत्वपूर्ण React2Shell भेद्यता (जिसे CVE-2025-55182 के नाम से भी जाना जाता है) से प्रभावित होने की तुरंत जाँच करने में मदद के लिए बनाया गया है।
यह दो-स्तरीय जाँच करती है:
React और Next.js के ज्ञात कमजोर संस्करणों के लिए आपकी package.json फ़ाइल का निरीक्षण करती है।package.json ढूँढता है: यह उस निर्देशिका में package.json फ़ाइल ढूँढता है जहाँ इसे चलाया गया है।react और next के सटीक संस्करण ढूँढता है।npm install कमांड प्रदान करती है।"use server""use client"createSafeActionClientregisterServerReferencereact-server-dom-webpackpython3 --version चलाकर जाँच सकते हैं।pip install packaging
सुनिश्चित करें कि verify_react_vulnerability.py स्क्रिप्ट आपकी परियोजना की मूल निर्देशिका (आपकी package.json के समान निर्देशिका) में है।
अपना टर्मिनल खोलें और कमांड चलाएँ:
python3 verify_react_vulnerability.py
यदि कोई कमजोर लाइब्रेरी संस्करण मिलता है, तो स्क्रिप्ट रुक जाती है और तुरंत समस्या की रिपोर्ट करती है:
--- Step 1: Checking versions in package.json ---
❌ VULNERABLE: Found React version 19.0.1.
...
-------------------------------------------------
❌ SUMMARY: Your project is VULNERABLE based on dependency versions.
Please update the following dependencies immediately.
--- Recommended Fixes ---
npm install [email protected] [email protected]
...
-------------------------------------------------
यदि आपकी निर्भरताएँ सुरक्षित हैं, तो स्क्रिप्ट गहन स्कैन का विकल्प देगी।
--- Step 1: Checking versions in package.json ---
✅ OK: Found React version 18.3.1. Not in a known vulnerable range.
...
-------------------------------------------------
✅ INFO: Your project's dependencies do not seem to be affected by React2Shell.
However, vulnerable features might be in use if code was copy-pasted or 'vendored'.
Do you want to perform a comprehensive deep code scan? (y/n): y
यदि गहन स्कैन को संकेतक मिलते हैं, तो यह एक विस्तृत रिपोर्ट प्रदान करेगा:
--- Step 2: Performing Comprehensive Deep Code Scan ---
Searching for patterns related to React Server Components...
⚠️ WARNING: Deep scan found indicators of React Server Component usage.
This does not guarantee a vulnerability, but warrants a manual review.
Ensure your framework versions are fully patched.
- Found pattern '"use server"':
Reason: Indicates a file contains React Server Actions, the primary feature associated with the vulnerability.
In files: ['src/actions/auth.ts']
- Found pattern '"use client"':
Reason: Indicates a Client Component, which may import and use Server Actions from other files.
In files: ['src/components/LoginButton.tsx', 'src/components/ThemeSwitcher.tsx']
-------------------------------------------------
यदि गहन स्कैन को कुछ नहीं मिलता, तो यह पुष्टि करेगा कि आपकी परियोजना संभवतः सुरक्षित है:
--- Step 2: Performing Comprehensive Deep Code Scan ---
Searching for patterns related to React Server Components...
✅ OK: The comprehensive deep scan did not find any indicators of RSC usage.
-------------------------------------------------