CVE-2017-1000427
Description
marked version 0.3.6 and earlier is vulnerable to an XSS attack in the data: URI parser.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
marked versions before 0.3.7 are vulnerable to stored XSS via crafted data: URIs in markdown input.
Vulnerability
marked version 0.3.6 and earlier contains a cross-site scripting (XSS) vulnerability in the data: URI parser [1]. The parser does not sanitize data URI content when rendering markdown links, allowing an attacker to inject arbitrary HTML or JavaScript. The vulnerable versions are all releases prior to 0.3.7 [1][4].
Exploitation
An attacker can craft a markdown link with a data: URI that contains base64-encoded JavaScript or HTML, such as `xss link [1]. If a user views the rendered markdown output, the browser executes the embedded script. No authentication or special network position is required beyond the ability to provide markdown content that is processed by a vulnerable marked` instance, such as a comment, document, or message on a web application using the library.
Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim's browser session when the rendered markdown is loaded [1]. This can lead to theft of session cookies, exfiltration of sensitive data, defacement, or other client-side attacks. The attacker gains the same privileges as the victim user within the affected application.
Mitigation
Upgrade marked to version 0.3.7 or later, where the data: URI parser properly validates or blocks malicious content [1][4]. No workaround is available for earlier versions; applications should also implement output sanitization using libraries such as DOMPurify as a defense-in-depth measure [3].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
markednpm | < 0.3.7 | 0.3.7 |
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-7px7-7xjx-hxm8ghsaADVISORY
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BO2RMVVZVV6NFTU46B5RYRK7ZCXYARZS/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M6BJG6RGDH7ZWVVAUFBFI5L32RSMQN2S/mitrevendor-advisoryx_refsource_FEDORA
- nvd.nist.gov/vuln/detail/CVE-2017-1000427ghsaADVISORY
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BO2RMVVZVV6NFTU46B5RYRK7ZCXYARZSghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/M6BJG6RGDH7ZWVVAUFBFI5L32RSMQN2SghsaWEB
- snyk.io/vuln/npm:marked:20170112ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.