sirv@2.0.4

The optimized & lightweight middleware for serving requests to static assets

  • latest version

    3.0.2

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    1 years ago

  • licenses detected

  • Direct Vulnerabilities

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

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • L
    Directory Traversal

    sirv is a The optimized & lightweight middleware for serving requests to static assets

    Affected versions of this package are vulnerable to Directory Traversal via the viaLocal function, which uses a dirname prefix. An attacker can access files outside the intended public directory by sending crafted requests that exploit symlinks and naming similarities, bypassing access restrictions.

    Note: This is only exploitable if the server is explicitly exposed to the network using the --host flag or the server.host configuration option, the public directory feature is enabled, and there are symlinks in a public directory.

    How to fix Directory Traversal?

    Upgrade sirv to version 3.0.2 or higher.

    <3.0.2