@fastify/static@10.1.11

Plugin for serving static files as fast as possible.

  • latest version

    10.1.12

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    3 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
    Exposure of Information Through Directory Listing

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

    Affected versions of this package are vulnerable to Exposure of Information Through Directory Listing via the sendDirectoryList() function when the plugin is configured with dotfiles: 'deny' or 'ignore' alongside directory listing enabled. A request for a denied dot-directory (e.g. /.git/) triggers a 403 from the underlying @fastify/send step, but the listing fallback misreads that 403 on a path ending in / as a directory without an index file and serves the directory listing anyway. An unauthenticated client can recursively enumerate file and subdirectory names inside dot-directories the operator explicitly denied, such as version control metadata, backup files, and key file names. File contents remain protected and only names are disclosed.

    Note: This is only exploitable when dotfiles is set to 'deny' or 'ignore' and directory listing (list) is explicitly enabled.

    How to fix Exposure of Information Through Directory Listing?

    Upgrade @fastify/static to version 10.1.12 or higher.

    <10.1.12