CVE-2026-6410

@fastify/static vulnerable to path traversal in directory listing

Published Apr 16, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
@fastify/static versions 8.0.0 through 9.1.0 allow path traversal when directory listing is enabled via the list option. The dirList.path() function resolves directories outside the configured static root using path.join() without a containment check. A remote unauthenticated attacker can obtain directory listings for arbitrary directories accessible to the Node.js process, disclosing directory and file names. File contents are not disclosed. Upgrade to @fastify/static 9.1.1 to fix this issue. As a workaround, disable directory listing by removing the list option from the plugin configuration.

Analysis

AI-generated

Technical impact

The vulnerability in @fastify/static allows a path traversal flaw when directory listing is enabled. A remote unauthenticated attacker can cause the plugin to resolve directories outside the configured static root and return the names of files and subdirectories present on any directory reachable by the Node.js process. The file contents themselves are not exposed, but the leaked names can aid in reconnaissance and further attacks.

Affected Systems

Node.js applications that depend on @fastify/static versions 8.0.0 through 9.1.0 and have the directory listing (list) option enabled are affected. Any deployment using one of these plugin versions is at risk.

Risk and Exploitability

The vulnerability has a CVSS score of 5.3, indicating moderate severity. No EPSS score is available, and it is not listed in the CISA KEV catalog, but the remote unauthenticated access model and lack of containment checks make exploitation relatively straightforward for an attacker who can trigger the directory listing. The impact consists of exposing directory and file names to the attacker, which undermines confidentiality and may facilitate further exploitation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to @fastify/static 9.1.1 or later
  • If an upgrade cannot be performed immediately, disable directory listing by removing the list option from the plugin configuration
  • Restrict the Node.js process file system permissions so that it only has access to the directories that must be served

Generated by OpenCVE AI on April 17, 2026 at 02:59 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pr96-94w5-mx2h @fastify/static vulnerable to path traversal in directory listing
History
Type Values Removed Values Added
CPEs cpe:2.3:a:fastify:fastify-static:*:*:*:*:*:node.js:*:* cpe:2.3:a:fastify:fastify-static:*:*:*:*:*:*:*:*
Type Values Removed Values Added
CPEs cpe:2.3:a:fastify:fastify-static:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify-static
Vendors & Products Fastify
Fastify fastify-static
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description @fastify/static versions 8.0.0 through 9.1.0 allow path traversal when directory listing is enabled via the list option. The dirList.path() function resolves directories outside the configured static root using path.join() without a containment check. A remote unauthenticated attacker can obtain directory listings for arbitrary directories accessible to the Node.js process, disclosing directory and file names. File contents are not disclosed. Upgrade to @fastify/static 9.1.1 to fix this issue. As a workaround, disable directory listing by removing the list option from the plugin configuration.
Title @fastify/static vulnerable to path traversal in directory listing
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
openjs
Published
Updated
Apr 16, 2026, 2:19 PM
Reserved
Apr 15, 2026, 10:59 PM
Status
Analyzed
Published
Apr 16, 2026, 2:16 PM
Modified
Jun 17, 2026, 11:00 AM
Severity
Moderate
Public date
Apr 16, 2026, 1:29 PM