CVE-2017-16006: remarkable XSS via data URI in links

CVE-2017-16006 · Severity: info · Published 2018-11-09

Remarkable is a JavaScript markdown parser widely used in web applications to convert markdown text into HTML. The library failed to block data: URIs in markdown links, allowing attackers to craft markdown containing malicious JavaScript that would execute in the browser of anyone viewing the rendered content. This could lead to session hijacking, credential theft, or malware delivery.

Technologies: remarkable (npm). Vendors: npm.

Quick answers

Is CVE-2017-16006 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2017-16006 being exploited in the wild.
How severe is CVE-2017-16006?
Informational severity, published 9 November 2018.
Which products and versions are affected?
remarkable (npm) SEMVER:introduced=0,fixed=1.7.0.
Is there a fix for CVE-2017-16006?
Yes. remarkable (npm): upgrade to 1.7.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2017-16006 attacked?
It is attacked over the network.
Am I affected by CVE-2017-16006?
Check whether you run remarkable (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • remarkable (npm): upgrade to 1.7.0 or later
    npm install remarkable@1.7.0

Technical details

The vulnerability is a cross-site scripting (XSS) flaw in remarkable's link validation logic (CWE-79). The markdown parser did not filter or block data: URIs in link targets, allowing attackers to embed data: URLs containing JavaScript payloads (e.g., `[link](data:text/html,<script>alert('xss')</script>)`). When a user clicks such a link or the page is rendered, the JavaScript executes in the security context of the hosting domain. The vulnerability affects all versions prior to 1.7.0, and requires only that an attacker can inject markdown content into a document processed by the library. A fix was released in v1.7.0 with proper URI scheme validation.

Affected products

  • remarkable remarkable <1.7.0

Identifiers

  • CVE-2017-16006
  • GHSA-mrmf-qwxg-7c3h

Timeline

  • 2016-08-20: disclosed: Issue reported on GitHub
  • 2018-11-09: advisory: GHSA advisory published
  • 2017-01-01: patched: Fix released in v1.7.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.