A newly discovered XML eXternal Entity (XXE) Injection vulnerability, CVE-2024-30043, has been identified in both on-premises and cloud instances of SharePoint, posing a significant threat to users. This medium-severity flaw, rated 6.3, allows attackers to perform a variety of malicious actions, including reading files with SharePoint Farm Service Account permission, SSRF attacks, NTLM relaying, and potentially executing remote code. The vulnerability arises from flaws in XML fetching and parsing within the BaseXmlDataSource DataSource class, specifically through the Execute method that accepts user-controlled input.
The vulnerability is particularly concerning because it can be exploited by low-privileged users. The advisory explains that the issue exists due to improper handling of the “request” parameter, which should point to an XML file. Despite initial security measures, such as setting DtdProcessing to Prohibit and using a secure XML resolver, a loophole allows the malicious payload to be executed. This is due to the resolver handling parameter entities before the DTD prohibition check is enforced, resulting in the payload being processed and an exception thrown too late to prevent exploitation.
The implications of this vulnerability are severe, as attackers can leverage it to perform out-of-band XXE attacks and exfiltrate data. The exploit demonstrates how a seemingly secure setup can be bypassed, leading to significant risks for SharePoint users. Microsoft addressed this issue in the May 2024 Patch Tuesday updates, enhancing URL parsing controls and ensuring that the XmlTextReader object prohibits DTD usage entirely.
To protect against potential exploitation, it is crucial for SharePoint users to update their systems to the latest versions immediately. This patch mitigates the vulnerability by implementing stricter controls and preventing the previously possible malicious payload execution. Staying vigilant and applying security updates promptly is essential to safeguarding SharePoint environments from such critical vulnerabilities.
Reference: