marked@0.1.3 vulnerabilities

A markdown parser built for speed

  • latest version

    15.0.3

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    15 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the marked package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when unsanitized user input is passed to block.def.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 4.0.10 or higher.

    <4.0.10
    • M
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when passing unsanitized user input to inline.reflinkSearch, if it is not being parsed by a time-limited worker thread.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 4.0.10 or higher.

    <4.0.10
    • M
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The em regex within src/rules.js file have multiple unused capture groups which could lead to a denial of service attack if user input is reachable.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 1.1.1 or higher.

    <1.1.1
    • M
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). A Denial of Service condition could be triggered through exploitation of the heading regex.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 0.4.0 or higher.

    <0.4.0
    • M
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The inline.text regex may take quadratic time to scan for potential email addresses starting at every point.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 0.6.2 or higher.

    >=0.1.3 <0.6.2
    • H
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). This can cause an impact of about 10 seconds matching time for data 150 characters long.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 0.3.18 or higher.

    <0.3.18
    • M
    Cross-site Scripting (XSS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). When mangling is disabled via option mangle, marked doesn't escape target href. This may allow an attacker to inject arbitrary html-event into resulting a tag.

    For example:

    var marked = require('marked');
    marked.setOptions({
      renderer: new marked.Renderer(),
      sanitize: true,
      mangle: false
    });
    
    text = `
    <bar"onclick="alert('XSS')"@foo>
    `;
    
    console.log(marked(text));
    

    will render:

    <p><a href="mailto:bar"onclick="alert('XSS')"@foo">bar"onclick="alert('XSS')"@foo</a></p>
    

    How to fix Cross-site Scripting (XSS)?

    Upgrade marked to version 0.3.9 or higher.

    <0.3.9
    • H
    Cross-site Scripting (XSS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). Browsers support both lowercase and uppercase x in hexadecimal form of HTML character entity, but marked unescaped only lowercase.

    This may allow an attacker to create a link with javascript code.

    For example:

    var marked = require('marked');
    marked.setOptions({
      renderer: new marked.Renderer(),
      sanitize: true
    });
    
    text = `
    lower[click me](javascript&#x3a;...)lower
    upper[click me](javascript&#X3a;...)upper
    `;
    
    console.log(marked(text));
    

    will render the following:

    <p>lowerlower
    upper<a href="javascript&#X3a;...">click me</a>upper</p>
    

    How to fix Cross-site Scripting (XSS)?

    Upgrade marked to version 0.3.9 or higher.

    <0.3.9
    • H
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when parsing the input markdown content (1,000 characters costs around 6 seconds matching time).

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 0.3.9 or higher.

    <0.3.9
    • H
    Cross-site Scripting (XSS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). Data URIs enable embedding small files in line in HTML documents, provided in the URL itself. Attackers can craft malicious web pages containing either HTML or script code that utilizes the data URI scheme, allowing them to bypass access controls or steal sensitive information.

    An example of data URI used to deliver javascript code. The data holds <script>alert('XSS')</script> tag in base64 encoded format.

    [xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)
    

    How to fix Cross-site Scripting (XSS)?

    Upgrade marked to version 0.3.7 or higher.

    <0.3.7
    • M
    VBScript Content Injection

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to VBScript Content Injection. [xss link](vbscript:alert(1&#41;)

    will get a link

    <a href="vbscript:alert(1)">xss link</a>

    This script does not work in IE 11 edge mode, but works in IE 10 compatibility view.

    How to fix VBScript Content Injection?

    Upgrade marked to version 0.3.3 or higher.

    <0.3.3
    • M
    Multiple Content Injection Vulnerabilities

    Marked comes with an option to sanitize user output to help protect against content injection attacks.

    sanitize: true

    Even if this option is set, marked is vulnerable to content injection in multiple locations if untrusted user input is allowed to be provided into marked and that output is passed to the browser.

    Injection is possible in two locations

    • gfm codeblocks (language)
    • javascript url's

    Source: Node Security Project

    Note: CVE-2014-1850 is a duplicate of CVE-2014-3743

    How to fix Multiple Content Injection Vulnerabilities?

    Upgrade to version 0.3.1 or later

    <0.3.1
    • H
    Regular Expression Denial of Service (ReDoS)

    marked is a low-level compiler for parsing markdown without caching or blocking for long periods of time.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when certain types of input are passed in to be parsed.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade marked to version 0.3.4 or higher.

    <0.3.4