A Look at CVE-2017-8514 --- SharePoint's `Follow` Feature XSS
The SharePoint 'Follow' feature reflected the SiteName GET parameter into an inline JavaScript context without encoding dangerous characters, allowing an attacker to inject script. An attacker could craft a URL that executes arbitrary JavaScript in a victim's browser when visited.
Published on respectxss.blogspot.com
SharePoint needs no more marketing given it is one of the most popular enterprise content management systems. According to Redmond Magazine: "SharePoint and OneDrive are used by more than 75,000 customers, with more than 160 million users.".
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the SiteName parameter was reflected into an inline JavaScript string without proper encoding or validation.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser in the context of the SharePoint site, potentially leading to actions on behalf of the user; the report demonstrates this with a confirm dialog.
What the attacker needed
Victim visits a crafted URL; SharePoint site with Follow feature
The fix
Microsoft released a fix as part of June 2017 updates.
How it was found
- Visit a SharePoint site's home page with the FollowSite and SiteName parameters in the URL.
- Set FollowSite to 0 or 1 and SiteName to a value containing a single quote and JavaScript.
- The page reflects SiteName into an inline script, executing the JavaScript.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you click a link, the website sometimes takes information from the link and puts it on the page. Here, SharePoint put a value from the link directly into a script without cleaning it, so an attacker could make the page run their own code. This is called cross-site scripting (XSS): it lets an attacker run code in your browser as if it were the website.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.