cbcvebase.
CVE-2025-49704
published 2025-07-08

CVE-2025-49704: Improper control of generation of code ('code injection') in Microsoft Office SharePoint allows an authorized attacker to execute code over a network.

PriorityP196high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
KEVITWEXPLOITRansomware
CISA Known Exploited Vulnerabilitydue 2025-07-23
Exploited in the wild
EPSS
99.91%
100.0th percentile
Improper control of generation of code ('code injection') in Microsoft Office SharePoint allows an authorized attacker to execute code over a network.

Affected

7 ranges
VendorProductVersion rangeFixed in
microsoftmicrosoft_sharepoint_enterprise_server_2016>= 16.0.0 < 16.0.5508.100016.0.5508.1000
microsoftmicrosoft_sharepoint_server_2019>= 16.0.0 < 16.0.10417.2002716.0.10417.20027
microsoftsharepoint_server
microsoftsharepoint_server
msrcmicrosoft_sharepoint_enterprise_server_2016
msrcmicrosoft_sharepoint_server_2019
msrcmicrosoft_sharepoint_server_subscription_edition

Detection & IOCsextracted from sources · hover to see the quote

filenamespinstall0.aspx
url/_layouts/15/ToolPane.aspx?DisplayMode=Edit
urlc34718cbb4c6.ngrok-free.app/file.ps1
processw3wp.exe spawning encoded PowerShell
domainupdate.micfosoft.com
pathC:\Users\Administrator\Desktop\work\tools\ak47c2\dnsclinet-c\dnsclient\x64\Release\dnsclient.pdb
pathC:\Users\Administrator\Desktop\work\tools\ak47c2\httpclient-cpp\x64\Release\httpclient-cpp.pdb
commandcmd.exe /c 2>&1
snort
SID 65092
snort
SID 65183
yara
Asp.Webshell.SharpyShell-10056352-3
  • Detect ToolShell exploitation by monitoring IIS logs for POST requests to the vulnerable ToolPane endpoint with a spoofed Referer header
  • Use the Microsoft 365 Defender KQL query to detect creation of spinstall0.aspx in the SharePoint LAYOUTS directory
  • The attacker sends a POST request to /_layouts/15/ToolPane.aspx?DisplayMode=Edit using a crafted Referer header (/_layouts/SignOut.aspx) to bypass authentication
  • Monitor for w3wp.exe (SharePoint worker process) spawning child processes, especially encoded PowerShell, as a post-exploitation indicator
  • Storm-2603 HTTP backdoor sends JSON beacons with fields cmd, cmd_id, fqdn, result, type to C2; detect Content-Type: text/plain POST requests with this JSON structure from SharePoint servers
  • Detect ransomware ransom note filenames associated with Storm-2603: 'How to decrypt my data.log' (x2anylock/Warlock) and '.README.txt' (LockBit Black)
  • Velociraptor version 0.73.4.0 (outdated, vulnerable to CVE-2025-6264) was installed on servers for persistence by Storm-2603; detect unexpected Velociraptor installations on servers
  • ·CVE-2025-49704 requires an authenticated attacker to extract the ValidationKey; the later bypass CVE-2025-53770 eliminates the authentication requirement, enabling unauthenticated RCE
  • ·These vulnerabilities affect only on-premises SharePoint Server deployments; SharePoint Online (Microsoft 365) is NOT impacted
  • ·In many reported cases it is unclear whether observed in-the-wild exploitation reflects abuse of the original CVEs (CVE-2025-49704/49706) or their bypasses (CVE-2025-53770/53771)
  • ·After patching, ASP.NET machine keys must be rotated (via Update-SPMachineKey PowerShell or Central Admin Machine Key Rotation Job) and IIS restarted, as stolen keys can still be used for forged ViewState RCE
  • ·Existing Snort SID 65092 (published for CVE-2025-49704 on July 8) was confirmed by Talos to remain effective against the newer bypass variants as well

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vulncheck8.8HIGH
cisa8.8HIGH
vendor_msrc9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

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.