CVE-2026-130811

Description

A flaw was found in @fastify/static. When directory listing is enabled alongside settings configured to deny access to dotfiles (hidden files or folders prefixed with a dot), the application misinterprets requests for restricted directories ending with a slash. This issue allows an unauthenticated remote attacker to bypass access restrictions and enumerate the names of protected files and subdirectories, resulting in information disclosure.

Statement

This vulnerability is rated as Moderate severity because, although exploitable remotely without authentication, the scope of exposure is restricted to enumerating file and directory names rather than reading file contents. The risk is further constrained as it requires the static file plugin to be explicitly configured with directory listing enabled alongside restricted hidden directories. In default configurations or where directory indexing is disabled, instances are not exposed to unauthorized metadata enumeration.

Mitigation

To mitigate this issue, disable directory listing in the @fastify/static configuration by setting the `list` option to `false` or omitting it from the plugin registration options. Alternatively, ensure that the directory root configured for static file serving does not contain sensitive dot-directories (such as `.git` or backup directories).

Warning: Modifying Fastify application configurations requires restarting the service, which may lead to brief service unavailability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.3N/A5.3
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityLowN/ALow
Integrity ImpactNoneN/ANone
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Understanding the Weakness (CWE)

Confidentiality,Integrity

Technical Impact: Read Files or Directories; Modify Files or Directories

Frequently Asked Questions

Want to get errata notifications? Sign up here.