Skip to content
OpenAdvisories
Medium · 5.3 Scanner template CVE-2024-22207 EUVD-2024-0266GHSA-62jr-84gf-wmg4

Default swagger-ui configuration exposes all files in the module

Published Jan 15, 2024 · Updated Jun 17, 2025 · Assigned by GitHub_M

Description

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 products

VendorProductAffectedFixed
fastify fastify-swagger-ui < 2.1.0 —

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
npm @fastify/swagger-ui >= 2.0.0, < 2.1.0 2.1.0 GHSA-62jr-84gf-wmg4

References