CVE-2026-115515
Description
A flaw was found in @fastify/static, which leads to information disclosure. The access control check evaluates only the requested path before resolving default index files or file extensions, and the component serves the resolved file without re-verifying access permissions. An unauthenticated remote attacker can exploit this flaw by requesting directory paths or extensionless filenames to bypass path restriction rules. This issue allows unauthorized access to sensitive files stored within the static file root directory.
Statement
This vulnerability is rated as Moderate severity because, while an unauthenticated remote client can bypass access restrictions to read restricted files, the impact is strictly confined to unauthorized read-only access within the designated static root directory and requires specific application configurations utilizing custom path-guard logic alongside file extension or directory indexing features. Applications that do not rely on @fastify/static path filtering or that serve static assets through independent reverse proxies are unaffected. The flaw does not grant unauthorized write access, administrative control, or arbitrary code execution.
Mitigation
To mitigate this issue without upgrading, adjust the @fastify/static configuration within the application:
1. Disable automatic directory indexing and file extension resolution by setting `index: false` and omitting or leaving empty the `extensions` option when registering the plugin.
2. If directory indexing or extension resolution is necessary, modify the custom `allowedPath` handler to explicitly reject directory paths (e.g., trailing slashes) and extensionless variations corresponding to restricted files.
Caveat: Disabling these options requires clients to specify explicit filenames and extensions in their requests. Modifying application configuration requires restarting or reloading the affected Node.js service.
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)
Access Control
Technical Impact: Bypass Protection Mechanism
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.