Microsoft SharePoint's 'Follow' Feature XSS (CVE-2017–8514) -Adesh Kolte
The SharePoint 'Follow' feature reflected the SiteName GET parameter into an inline JavaScript string without encoding dangerous characters. An attacker could craft a URL that executes arbitrary JavaScript in a victim's browser when visited.
Published on web.archive.org
{{media:0}}
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
The application inserted the SiteName parameter into a single-quoted JavaScript string without encoding characters such as single quote, angle brackets, and slash.
Impact
An attacker could execute arbitrary JavaScript in the context of the SharePoint site when a victim visits a crafted link, potentially leading to actions such as reading cookies or performing actions on behalf of the user.
What the attacker needed
Victim clicks a crafted link; SharePoint site with Follow feature
The fix
The application should encode or reject dangerous characters in the SiteName parameter before inserting it into the script context.
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 'Follow' on a SharePoint site, the site name is taken from the web address and placed directly into a script on the page. Because special characters like quotes were not cleaned up, an attacker could put their own code in the site name and make the browser run it. This is called cross-site scripting (XSS): running someone else's script as if it were part of the trusted site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.