@fastify/static@10.1.1

Plugin for serving static files as fast as possible.

  • latest version

    10.1.3

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    1 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @fastify/static 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
    • M
    Incorrect Behavior Order: Validate Before Canonicalize

    @fastify/static is a Plugin for serving static files as fast as possible.

    Affected versions of this package are vulnerable to Incorrect Behavior Order: Validate Before Canonicalize via non-canonical URL path handling in the allowedPath check in index.js. An attacker can bypass file/subtree restrictions by sending paths such as //file, /./file, or /public/../private/file that allowedPath evaluates before pathname normalization. Applications that rely on allowedPath to block specific static files or deny access outside an allowed subtree can serve files that should have been rejected, exposing protected content to unauthorized clients.

    How to fix Incorrect Behavior Order: Validate Before Canonicalize?

    Upgrade @fastify/static to version 10.1.2 or higher.

    <10.1.2