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.
Published: 2026-04-16
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Directory information disclosure
Action: Apply Patch
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Fri, 17 Apr 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 16 Apr 2026 19:00:00 +0000

Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify-static
Vendors & Products Fastify
Fastify fastify-static

Thu, 16 Apr 2026 15:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Thu, 16 Apr 2026 14:00:00 +0000

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'}


Subscriptions

Fastify Fastify-static
cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-04-16T14:19:36.780Z

Reserved: 2026-04-15T22:59:38.193Z

Link: CVE-2026-6410

cve-icon Vulnrichment

Updated: 2026-04-16T14:19:32.758Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-04-16T14:16:20.173

Modified: 2026-04-17T15:17:00.957

Link: CVE-2026-6410

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-04-16T13:29:08Z

Links: CVE-2026-6410 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-17T03:00:08Z

Weaknesses