Aleksandr Dobkin<img src=404 onerror=alert(document.domain)> | GitHub Bug Bounty
30,750 pts Aleksandr Dobkin<img src=404 onerror=alert(document.domain)> @adob Earned badges Cross-Site Scripting (XSS) Injection Unvalidated Redirect or Forward Sensitive Data Exposure Reported vulnerabilities 1,500 pts Cross-site scripting in Markdown API @adob reported a XSS vulnerability in the GitHub API when rendering Markdown with a maliciously formatted attribute value. The GitHub Markdown API allows callers to render Markdown as HTML.
The provided Markdown is translated to HTML using our “HTML pipeline” before it is rendered and returned. This pipeline consists of a number of filters, one of which is responsible for “autolinking” URLs into clickable links in the resulting HTML. @adob discovered a way to use the script macros syntax to format an element’s attribute value in a way that caused the autolink logic to incorrectly generate a link and the resulting HTML to be malformed.
As a result, an attacker could inject arbitrary HTML in the result. While this API was never used on GitHub.com, we still took the threat seriously. We addressed the XSS vulnerability by removing support for script macros from our vendored copy of libxml2 that is used by Nokogiri. We have no use for script macros when parsing HTML and it is what caused the autolink logic to parse its input incorrectly. Reported on 03-29-2016 for GitHub API 3,000 pts Cross-site scripting in task lists @adob reported a XSS vulnerability when rendering a maliciously formatted task list .
Throughout GitHub.com users can provide markup that is translated to HTML using our “HTML pipeline” before it is rendered and displayed. This pipeline consists of a number of filters, one of which is responsible for translating task lists into HTML. @adob discovered a way to format a task list item so that it would render incorrectly and cause the resulting HTML to be malformed. In combination with using script macros to avoid escaping HTML attribute values, an attacker could inject arbitrary HTML in the rendered result.
While this issue was mitigated by our use of CSP, we still took the threat seriously. We addressed the XSS vulnerability by modifying our task list filter logic to parse task list items more strictly. In addition, we further mitigated this, and potential future issues, by removing support for script macros from our vendored copy of libxml2 that is used by Nokogiri. We have no use for script macros when parsing HTML and it provides a potentially dangerous vector for attackers.
While unescaped attribute values are not inherently unsafe, they can be when paired with bugs such as the one in our task list filter. Reported on 03-29-2016 for GitHub.com 500 pts DOM-based XSS via GitHub API @adob reported an XSS vulnerability that could be triggered by setting HTML content in a user’s profile that would be returned by the GitHub API. This data was subsequently queried by a GitHub web application and inserted unsafely into the DOM using innerHTML .
This lead to DOM-based XSS. While exploitation of this vulnerability only occurred within a static HTML site, with no user session or sensitive information, we still took the threat seriously. We addressed the behavior by replacing DOM manipulation using innerHTML with a safe alternative. Reported on 03-05-2016 2,000 pts Persistent cross-site scripting on wikis @adob discovered a DOM based XSS vulnerability within the wiki functionality on GitHub.com.
By setting an appropriate attribute on an HTML tag, @adob was able to leverage existing GitHub JavaScript to insert arbitrary HTML markup into the DOM. While our CSP policy prevented injection of JavaScript, @adob was able to leverage additional GitHub JavaScript to trigger an event handler that automatically submitted an injected HTML form element. We addressed the DOM XSS vulnerability by further restricting the allowed attributes for HTML tags in markup.
In addition, we are auditing and modifying multiple client and server side components to further reduce the risk associated with injected static HTML (such as forms). Reported on 02-07-2015 for GitHub.com 5,000 pts GitHub Pages remote code execution @adob reported an issue that could have allowed an attacker to instantiate arbitrary Ruby objects on the servers used to generate GitHub Pages sites. GitHub Pages had recently upgraded to a newer version of Jekyll that disabled safe_yaml support for monkey patching YAML#load to be secure by default.
An attacker could commit a malicious _config.yml file to their Pages repository that would cause an arbitrary object to be deserialized, possibly leading to remote code execution on the server. We addressed the vulnerability by explicitly enabling the safe_yaml gem for all of GitHub Pages. Reported on 08-07-2014 for GitHub.com 5,000 pts GitHub Pages arbitrary file read @adob reported an issue that could have allowed an attacker to read arbitrary files on the servers used to generate GitHub Pages sites.
We addressed the vulnerability by improving the file path sanitization that is done when generating a GitHub Pages site. We also performed an audit to ensure we were not using unsanitized file paths elsewhere in GitHub Pages. Reported on 06-19-2014 for GitHub.com 5,000 pts Service hooks remote code execution @adob reported an issue that allowed an attacker to instantiate arbitrary Ruby objects on a server used for GitHub Service Hooks.
Several service hooks use XMLRPC to serialize data between GitHub and the service hook endpoint. A malicious service hook endpoint could generate an XML response that would cause the hook service to dynamically instantiate an arbitrary Ruby object. Though object instantiation does not directly lead to remote code execution (RCE), it can often be used to do so. As a result, we treated the finding as a RCE and addressed the vulnerability immediately.
We addressed the vulnerability by disabling support for object marshalling in our XMLRPC configuration. We also performed an audit to ensure we were not using an insecure XMLRPC configuration elsewhere. Reported on 06-01-2014 for GitHub.com 2,500 pts Persistent cross-site scripting (with CSP bypass) @adob discovered a DOM based XSS vulnerability in GitHub.com. By setting an appropriate attribute on an HTML tag, @adob was able to leverage existing GitHub JavaScript to insert arbitrary HTML markup into the DOM.
In addition, @adob was able to exploit a Chrome browser bug to bypass our Content Security Policy (CSP) policy. These two bugs, in combination, would allow execution of user-controlled JavaScript on GitHub.com. While this XSS was browser specific, Chrome is the most popular browser on GitHub.com. We addressed the DOM XSS vulnerability by further restricting the allowed attributes for HTML tags in markup. In addition, we have modified our CSP policy to work around the bug in Chrome.
Reported on 02-10-2014 for GitHub.com 750 pts Referer leakage in Gist @adob identified that Referer headers could be leaked through specially crafted cross-origin image requests. In combination with a previously reported vulnerability in our OAuth redirect URI path parsing, this could lead to the disclosure of sensitive information passed to Gist on OAuth redirects. We remediated this issue by making more robust checks when rewriting links to our image proxy.
Reported on 02-10-2014 for GitHub Gist 500 pts Stored XSS on render.github.com @adob reported a stored XSS vulnerability within GeoJSON rendering on render.github.com . While exploitation of this vulnerability was limited to a sandboxed domain, we still took the threat seriously. We addressed the behavior by properly escaping user-controlled input. Reported on 02-07-2014 for GitHub.com 500 pts Contributors graph XSS in GitHub.com @adob reported a persistent XSS vulnerability that existed within our contributors graph page.
If the the default branch name for a repository contained HTML markup, the unescaped branch name was used on the contributors graph page. While exploitation of this
The rest of this page is on the live site.