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 Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 5.3 | N/A | 5.3 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | Low | N/A | Low |
| Integrity Impact | None | N/A | None |
| Availability Impact | None | N/A | None |
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
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.