cbcvebase.
CVE-2021-28474
published 2021-05-11

CVE-2021-28474: Microsoft SharePoint Server Remote Code Execution Vulnerability

PriorityP270high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
50.63%
98.8th percentile
Microsoft SharePoint Server Remote Code Execution Vulnerability

Affected

9 ranges
VendorProductVersion rangeFixed in
microsoftmicrosoft_sharepoint_enterprise_server_2016>= 16.0.0 < 16.0.5161.100016.0.5161.1000
microsoftmicrosoft_sharepoint_foundation_2013_service_pack_1>= 15.0.0 < 15.0.5345.100015.0.5345.1000
microsoftmicrosoft_sharepoint_server_2019>= 16.0.0 < 16.0.10374.2000016.0.10374.20000
microsoftsharepoint_foundation
microsoftsharepoint_server
microsoftsharepoint_server
msrcmicrosoft_sharepoint_enterprise_server_2016
msrcmicrosoft_sharepoint_foundation_2013_service_pack_1
msrcmicrosoft_sharepoint_server_2019

Detection & IOCsextracted from sources · hover to see the quote

url/_vti_bin/WebPartPages.asmx
path/SitePages/Forms/ByAuthor.aspx
commandysoserial.exe -p ViewState -g TypeConfuseDelegate -c "echo RCE > c:/windows/temp/SP_RCE_01.txt" --generator="AF878507" --validationkey="FAB45BC67E06323C48951DA2AEAF077D8786291E2748330F03B6601F09523B79" --validationalg="HMACSHA256" --islegacy --minify
filenameSP_soap_RCE_PoC.exe
pathC:\windows\temp\SP_RCE_01.txt
path/_layouts/15/ToolPane.aspx
path/_layouts/SignOut.aspx
pathC:\PROGRA~1\COMMON~1\MICROS~1\WEBSER~1\16\TEMPLATE\LAYOUTS\spinstall0.aspx
snort
alert http any any -> $HOME_NET any (msg:"ET WEB_SPECIFIC_APPS Microsoft Sharepoint WebPartPages Authenticated Remote Code Execution (CVE-2021-28474)"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/_vti_bin/WebPartPages.asmx"; fast_pattern; http.request_body; pcre:"/[rR][uU][nN][aA][tT](?:\x3d|\x253[dD]|\x26equals\x3b)(?:\x22|\x2522|\x26quot\x3b)server(?:\x22|\x2522|\x26quot\x3b)/"; content:"OuterHtml|3d|"; content:"|2f|web.config"; distance:0; reference:url,www.zerodayinitiative.com/blog/2021/7/7/cve-2021-28474-sharepoint-remote-code-execution-via-server-side-control-interpretation-conflict; reference:cve,2021-28474; classtype:web-application-attack; sid:2063645; rev:2; metadata:affected_product Microsoft_Sharepoint, attack_target Server, tls_state TLSDecrypt, created_at 2025_07_21, cve CVE_2021_28474, deployment Perimeter, deployment Internal, confidence High, signature_severity Major, tag Exploit, updated_at 2025_07_22, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application; target:dest_ip;)
  • Monitor for HTTP POST requests to /_vti_bin/WebPartPages.asmx containing 'OuterHtml' in the body alongside references to 'web.config', which indicates exploitation of the ExecuteProxyUpdates method to exfiltrate the machineKey.
  • Detect HTML-encoded variants of runat="server" (e.g., runat=&#x22;server&#x22; or runat=%22server%22) in ASPX markup submitted to SharePoint, as the bypass relies on HTML-encoding the attribute value to evade VerifyControlOnSafeList while still being executed at processing time.
  • Alert on POST requests to /ToolPane.aspx with DisplayMode=Edit parameter and HTTP Referer set to /SignOut.aspx, as this URL pattern and referer combination is a key indicator of CVE-2025-53770 exploitation (which chains from CVE-2021-28474 mechanics).
  • Hunt for ysoserial.exe invocations with '-p ViewState -g TypeConfuseDelegate' arguments on hosts that have access to SharePoint servers, as this is the tool and gadget chain used to forge malicious ViewState payloads for RCE.
  • Monitor for the creation of unexpected .txt or .aspx files in C:\windows\temp\ or C:\PROGRA~1\COMMON~1\MICROS~1\WEBSER~1\16\TEMPLATE\LAYOUTS\ by the SharePoint service account process, as these paths are used as RCE proof-of-execution drop locations.
  • Flag requests containing the __VIEWSTATE parameter in the query string sent to SharePoint pages (rather than in the POST body), as the exploit delivers the forged ViewState payload via URL query string.
  • ·Exploitation requires the attacker to be authenticated and hold SPBasePermissions.ManageLists on a SharePoint site. By default, any authenticated user can create a site and obtain these permissions, so the effective attack surface is all authenticated users.
  • ·The validationKey value (FAB45BC67E06323C48951DA2AEAF077D8786291E2748330F03B6601F09523B79) is from a specific PoC lab environment and is not a universal indicator; each SharePoint deployment has a unique machineKey. Detection should focus on the exfiltration attempt (web.config read via System.Web.UI.WebControls.Xml) rather than this specific key value.
  • ·The Snort rule (sid:2063645) was created on 2025-07-21 and requires TLS decryption (tls_state TLSDecrypt) to be effective against HTTPS SharePoint deployments.

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.06.5MEDIUMAV:N/AC:L/Au:S/C:P/I:P/A:P
vendor_msrc8.8HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.