CVE-2024-22207

published 15 Jan 2024 · updated 17 Jun 2025

Default swagger-ui configuration exposes all files in the module

6.3MediumCVSS 5.3EPSS 2%1 public exploits

A public exploit exists; no exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. No fixed version is recorded.

fastify-swagger-ui is a Fastify plugin for serving Swagger UI. Prior to 2.1.0, the default configuration of `@fastify/swagger-ui` without `baseDir` set will lead to all files in the module's directory being exposed via http routes served by the module. The vulnerability is fixed in v2.1.0. Setting the `baseDir` option can also work around this vulnerability.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
fastify<2.1.0

Exploit evidence

1 public sources

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-22207 severity on Zeptric[![CVE-2024-22207](https://zeptric.io/badge/cve/CVE-2024-22207.svg)](https://zeptric.io/cve/CVE-2024-22207)