@fastify/swagger-ui vulnerable to documentation authentication bypass via the unprotected /static route

State
Published
Severity
3.7 Low
Published
Nov 21, 2026
Updated
Nov 23, 2026
Reserved
Nov 19, 2026

Read the record on cve.org

Description

@fastify/swagger-ui is the plugin that serves Swagger UI documentation for Fastify applications. In versions 2.1.0 through 6.1.4, the authentication hooks that applications register to protect the documentation are applied to every route the plugin adds except the bundled static asset instance. When the option that serves bundled UI files from a local directory is enabled, that instance exposes every file in the directory without credentials, so a specification file an operator meant to keep behind the documentation login becomes reachable by an unauthenticated client who knows or guesses its name. Access is read-only and limited to files in that directory. The issue is fixed in @fastify/swagger-ui 6.1.5, which applies the same authentication hooks to the static asset route, and users should upgrade to 6.1.5 or later.

ProductVersions
@fastify/swagger-ui @fastify/swagger-ui2.1.0 to before 6.1.5 Affected6.1.5 Not Affected

Weaknesses

  • CWE-288 Authentication Bypass Using an Alternate Path or Channel

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.