# CVE-2017-1000427: Marked XSS vulnerability in data URI parser

Source: https://junglewise.ai/threats/cve-2017-1000427-marked-xss-vulnerability-in-data-uri-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-01-04. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2017-1000427 · Severity: low · CVSS 3 · Published 2018-01-04

Marked is a popular JavaScript library used to convert Markdown text into HTML. Versions 0.3.6 and earlier fail to properly sanitize data URIs, allowing an attacker to inject malicious scripts that execute in a user's browser when the Markdown is rendered. This could lead to session hijacking, credential theft, or malware distribution.

Technologies: [marked (npm)](https://junglewise.ai/threats/technologies/npm-marked). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2017-1000427 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-1000427 being exploited in the wild.

**How severe is CVE-2017-1000427?** Low severity, with a CVSS score of 3, published 4 January 2018.

**Which products and versions are affected?** marked (npm) SEMVER:introduced=0,fixed=0.3.7.

**Is there a fix for CVE-2017-1000427?** Yes. marked (npm): upgrade to 0.3.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2017-1000427 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2017-1000427?** Check whether you run marked (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

- marked (npm): upgrade to 0.3.7 or later

  ```sh
  npm install marked@0.3.7
  ```


## Technical details

The vulnerability is a cross-site scripting (XSS) flaw (CWE-79) in the data: URI parser component of Marked. Versions 0.3.6 and earlier fail to properly sanitize or neutralize user-controlled input within data URIs before rendering the output as HTML. An attacker can craft a Markdown document containing a malicious data URI in a link or image element that, when processed by Marked, executes arbitrary JavaScript in the context of the page. The attack requires user interaction (opening or viewing the crafted Markdown), but has network reach since Markdown can be served remotely. The fix is available in version 0.3.7 and later.

## Affected products

- markedjs Marked <0.3.7

## Identifiers

- CVE-2017-1000427
- GHSA-7px7-7xjx-hxm8

## Timeline

- 2018-01-04: disclosed
- 2018-01-04: patched: Fixed in Marked 0.3.7

## Related threats

- [marked Denial of Service via infinite recursion in tokenizer](https://junglewise.ai/threats/cve-2026-41680-marked-denial-of-service-via-infinite-recursion-in-tokenizer)
- [Marked Regular Expression Denial of Service (ReDoS)](https://junglewise.ai/threats/cve-2018-25110-marked-regular-expression-denial-of-service-redos)
- [marked Regular Expression Denial of Service in inline.reflinkSearch](https://junglewise.ai/threats/cve-2022-21681-marked-regular-expression-denial-of-service-in-inline)
- [marked ReDoS in block.def regular expression](https://junglewise.ai/threats/cve-2022-21680-marked-redos-in-block-def-regular-expression)
- [marked content injection in autolink](https://junglewise.ai/threats/marked-content-injection-in-autolink-0c735c59)
