CVE-2021-40487

8.1 HIGH

📋 TL;DR

CVE-2021-40487 is a remote code execution vulnerability in Microsoft SharePoint Server that allows authenticated attackers to execute arbitrary code on affected systems. This vulnerability affects SharePoint Server installations where attackers can upload specially crafted files. Organizations using vulnerable SharePoint Server versions are at risk.

💻 Affected Systems

Products:
  • Microsoft SharePoint Server
Versions: Microsoft SharePoint Server 2019, SharePoint Server 2016, SharePoint Server 2013 Service Pack 1
Operating Systems: Windows Server
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user access to SharePoint. SharePoint Online (Office 365) is not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of SharePoint Server with attacker gaining SYSTEM privileges, data exfiltration, lateral movement to other systems, and persistent backdoor installation.

🟠

Likely Case

Attacker gains control of SharePoint Server instance, accesses sensitive documents and user data, and potentially moves to other systems in the network.

🟢

If Mitigated

Limited impact with proper network segmentation, application whitelisting, and monitoring detecting anomalous file uploads.

🌐 Internet-Facing: HIGH - SharePoint servers often exposed to internet for collaboration, making them prime targets for exploitation.
🏢 Internal Only: MEDIUM - Internal attackers or compromised accounts could exploit this, but requires authentication.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires authenticated access and involves uploading specially crafted files. Proof-of-concept code has been published.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: October 2021 Security Updates

Vendor Advisory: https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-40487

Restart Required: Yes

Instructions:

1. Apply October 2021 Security Updates for SharePoint Server. 2. Restart SharePoint services. 3. Verify patch installation via Windows Update history or version check.

🔧 Temporary Workarounds

Restrict file upload types

windows

Configure SharePoint to block potentially dangerous file types from being uploaded

Implement strict authentication controls

all

Enforce multi-factor authentication and limit user permissions to minimum required

🧯 If You Can't Patch

  • Implement network segmentation to isolate SharePoint servers from critical systems
  • Deploy application control solutions to prevent execution of unauthorized code

🔍 How to Verify

Check if Vulnerable:

Check SharePoint Server version and compare against patched versions. Vulnerable if running SharePoint Server 2019, 2016, or 2013 SP1 without October 2021 updates.

Check Version:

Get-SPFarm | Select BuildVersion

Verify Fix Applied:

Verify October 2021 security updates are installed via Windows Update history or PowerShell command: Get-HotFix -Id KB5001924 (SharePoint 2019), KB5001925 (SharePoint 2016), KB5001926 (SharePoint 2013)

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to SharePoint, particularly with suspicious extensions or content
  • Unexpected process creation from SharePoint worker processes
  • Authentication attempts from unusual locations or times

Network Indicators:

  • Outbound connections from SharePoint servers to suspicious external IPs
  • Unusual spikes in SharePoint traffic patterns

SIEM Query:

source="SharePoint" AND (event_id=6398 OR event_id=6399) AND file_extension IN ("aspx", "ashx", "asmx")

🔗 References

📤 Share & Export