CVE-2025-49704: Microsoft SharePoint Code Injection Vulnerability
Improper control of generation of code ('code injection') in Microsoft Office SharePoint allows an authorized attacker to execute code over a network.
CVE-2025-49704 is a code injection vulnerability in Microsoft SharePoint that can allow an authorized attacker to execute code over a network. It matters because SharePoint often sits at the center of document collaboration and internal portals; successful abuse can give attackers a foothold for further movement, data access, or ransomware deployment. Public reporting notes this issue can be chained with CVE-2025-49706, and CVE-2025-53770 is described as a patch bypass for CVE-2025-49704 whose updates provide more robust protection. Confirm all version and fix details against the current Microsoft and CISA advisories.
How it works
The weakness is classified as CWE-94 (code injection). In this class of flaw, an application improperly handles input that is later treated as executable code or script. An authorized attacker who can reach the vulnerable SharePoint surface over the network may inject malicious code that the server then executes in its own context. Exact injection points, request formats, and preconditions are not detailed in the provided facts; treat any public proof-of-concept claims cautiously and verify mechanics only against the vendor advisory. Because the attacker must already be authorized, the risk is highest where authentication is weak, accounts are over-privileged, or SharePoint is exposed more broadly than intended. Chaining with related SharePoint issues can expand impact beyond a single code-execution event.
Am I affected? How to find it in your systems
Microsoft SharePoint is commonly deployed as on-premises SharePoint Server (often behind reverse proxies or load balancers) or as SharePoint Online / Microsoft 365 services. Inventory every instance:
- Enumerate servers and sites that host SharePoint Server roles, farm databases, and web applications.
- Identify public-facing or partner-facing SharePoint endpoints, including those still running end-of-life or end-of-service releases such as SharePoint Server 2013 and earlier.
- For cloud or hybrid tenants, map which sites and apps rely on SharePoint Online and confirm whether any custom or third-party components interact with the same authentication boundary.
- Check configuration management, asset inventories, and Microsoft 365 admin centers for version and patch levels; exact affected builds must be confirmed against the vendor advisory.
Telemetry to review includes unusual process creation or script execution under SharePoint worker processes, unexpected web requests that result in high-privilege activity, new or modified web parts/pages after authentication, and authentication logs showing lateral use of service accounts. Correlate with ransomware indicators if you already suspect compromise, since this vulnerability has known ransomware use.
How to remediate
Patch first. Apply the Microsoft updates that address CVE-2025-49704 and, where available, the more robust updates associated with CVE-2025-53770 (the reported patch bypass). Follow the exact package and installation order published in the vendor advisory; do not assume a single cumulative update covers every related issue. After patching:
- Disconnect or decommission any public-facing SharePoint Server instances that have reached end-of-life or end-of-service, including SharePoint Server 2013 and earlier, as directed by CISA.
- For supported versions, implement the mitigations listed by CISA and Microsoft; for cloud services, adhere to applicable BOD 22-01 guidance or discontinue use if mitigations are unavailable.
- Harden the environment by reducing the number of accounts that can authenticate to SharePoint, enforcing least privilege, and reviewing custom solutions that accept or render user-controlled content.
- Validate that the farm or tenant is fully patched and that no residual unpatched nodes remain behind load balancers.
If you can't patch immediately
Reduce exposure until the vendor updates can be installed:
- Remove public internet access to on-premises SharePoint Server; place remaining instances behind VPN, zero-trust access, or strict network segmentation so only authorized management and user networks can reach them.
- Apply virtual patching or WAF rules that block anomalous request patterns associated with code-injection attempts against SharePoint, while understanding that such rules are incomplete substitutes for the official fix.
- Disable or restrict any non-essential features, custom web parts, or remote interfaces that increase the attack surface until they can be reviewed.
- Increase monitoring of SharePoint authentication, process creation, and file-system changes; alert on post-authentication code execution or unexpected outbound connections.
- If mitigations cannot be applied, plan to discontinue use of the affected product surface rather than leave it exposed.
If your data may have been exposed
Actively exploited vulnerabilities, especially those with known ransomware use, frequently lead to data theft or encryption. Assume that any SharePoint content reachable by the compromised identity could have been accessed. Rotate credentials for affected accounts and service principals, review audit logs for data exfiltration, and follow your incident-response plan for containment and recovery. You can also run a free exposure scan of your email address against known breach data to check whether related credentials have appeared in prior incidents.
AICompiled with AI assistance from public sources and published under our editorial standards.
Details
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H