Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2023-21742

CVE-2023-21742: Microsoft SharePoint Foundation RCE Flaw

CVE-2023-21742 is a remote code execution vulnerability in Microsoft SharePoint Foundation that enables attackers to execute arbitrary code on affected servers. This article covers technical details, affected versions, and mitigation.

Updated:

CVE-2023-21742 Overview

CVE-2023-21742 is a remote code execution vulnerability in Microsoft SharePoint Server. The flaw allows an authenticated attacker with low privileges to execute arbitrary code on a vulnerable SharePoint instance over the network. Microsoft disclosed the issue as part of the January 2023 Patch Tuesday release. The vulnerability maps to [CWE-284] (Improper Access Control) and affects SharePoint Foundation 2013, SharePoint Server 2013, 2016, 2019, and SharePoint Server Subscription Edition.

The EPSS probability is approximately 16.5%, placing this CVE in the 94.97th percentile for likelihood of exploitation activity. No public proof-of-concept is currently catalogued in ExploitDB, and CISA has not added it to the Known Exploited Vulnerabilities (KEV) catalog.

Critical Impact

An authenticated attacker on the network can achieve remote code execution on the SharePoint server, leading to full compromise of content, user data, and the underlying application context.

Affected Products

  • Microsoft SharePoint Foundation 2013 SP1
  • Microsoft SharePoint Server 2013 SP1, 2016, 2019
  • Microsoft SharePoint Server Subscription Edition

Discovery Timeline

  • 2023-01-10 - Microsoft publishes the security advisory and patch for CVE-2023-21742
  • 2023-01-10 - CVE-2023-21742 published to the National Vulnerability Database (NVD)
  • 2024-11-21 - Last updated in the NVD database

Technical Details for CVE-2023-21742

Vulnerability Analysis

The vulnerability resides within Microsoft SharePoint Server's handling of authenticated user requests. An attacker who obtains valid SharePoint credentials at any privilege tier can send a crafted request that triggers code execution in the context of the SharePoint application pool identity. Because SharePoint runs server-side .NET workloads tied to IIS and SQL backends, successful exploitation extends the attacker's reach beyond the web front end into stored content, search indexes, and service applications.

The attack requires no user interaction and can be performed entirely over the network against the SharePoint web tier. SharePoint deployments often serve as collaboration hubs containing sensitive documents, making post-exploitation impact substantial across confidentiality, integrity, and availability.

Root Cause

Microsoft categorizes the flaw under improper access control [CWE-284]. The product fails to correctly restrict an authenticated user's ability to invoke functionality that should be reserved for higher-privileged identities or internal server logic. Microsoft has not publicly released the specific vulnerable function or class. Refer to the Microsoft Security Update CVE-2023-21742 advisory for vendor-supplied technical context.

Attack Vector

The attack vector is network-based. An attacker authenticates to SharePoint with standard user credentials, then issues a specially crafted request to a vulnerable endpoint on the SharePoint web application. The server processes the request under the application pool identity, allowing the attacker's payload to execute server-side. Stolen credentials, password spraying against exposed SharePoint portals, and prior phishing campaigns are realistic precursors to exploitation.

No verified public proof-of-concept code is available. See the Microsoft Security Update CVE-2023-21742 advisory for the official patch notes.

Detection Methods for CVE-2023-21742

Indicators of Compromise

  • Unexpected w3wp.exe child processes spawning cmd.exe, powershell.exe, or other interactive shells on SharePoint web front-end servers
  • New or modified .aspx, .ashx, or .asmx files in SharePoint web application directories such as C:\inetpub\wwwroot\wss\VirtualDirectories\
  • IIS access logs showing authenticated POST requests to SharePoint endpoints immediately preceding outbound network connections from the SharePoint host
  • Anomalous use of SharePoint service accounts to access file shares, domain controllers, or SQL servers beyond their normal scope

Detection Strategies

  • Monitor process lineage on SharePoint servers and alert on any child process of w3wp.exe that is not part of the standard SharePoint binary set
  • Compare on-disk SharePoint web files against a known-good baseline to identify webshells or modified handlers
  • Correlate authentication events against SharePoint with subsequent server-side process creation to surface credentialed exploitation

Monitoring Recommendations

  • Forward IIS, Windows Security, and Sysmon process-creation events from SharePoint servers to a centralized analytics platform
  • Track outbound network connections originating from the SharePoint application pool identity and flag connections to unexpected destinations
  • Audit SharePoint farm administrator and service account logons for unusual source hosts or off-hours activity

How to Mitigate CVE-2023-21742

Immediate Actions Required

  • Apply the January 2023 SharePoint security updates from Microsoft to all affected SharePoint Foundation and SharePoint Server installations
  • Inventory all internet-exposed SharePoint instances and prioritize patching for externally reachable farms
  • Rotate credentials for any account that authenticated to an unpatched SharePoint server during the exposure window
  • Review SharePoint web directories and IIS logs for indicators of post-exploitation activity

Patch Information

Microsoft released fixes for SharePoint Foundation 2013 SP1, SharePoint Server 2013 SP1, SharePoint Server 2016, SharePoint Server 2019, and SharePoint Server Subscription Edition on 2023-01-10. Administrators should download and apply the updates referenced in the Microsoft Security Update CVE-2023-21742 advisory, then run the SharePoint Products Configuration Wizard or PSConfig on each farm server.

Workarounds

  • Restrict SharePoint access at the network edge to authenticated VPN or Zero Trust gateway users until patches are deployed
  • Enforce multi-factor authentication on all SharePoint accounts to raise the cost of credential-based access
  • Remove or disable unused SharePoint user accounts and service accounts to reduce the authenticated attack surface
bash
# Configuration example: run SharePoint configuration wizard after patch installation
Start-Process -FilePath "$env:CommonProgramFiles\Microsoft Shared\Web Server Extensions\16\BIN\PSConfig.exe" `
  -ArgumentList "-cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures" `
  -Wait

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.