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 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)

Access Control

Technical Impact: Bypass Protection Mechanism

Frequently Asked Questions

Want to get errata notifications? Sign up here.