Skip to content
Vulnerability Intelligence

CVE-2024-22207

Medium

Default swagger-ui configuration exposes all files in the module

Published Jan 16, 2024 · Updated Sep 10, 2026 · Also known as GHSA-62jr-84gf-wmg4

Key Facts

Routine patching
  • CVE-2024-22207 is a medium-severity vulnerability (CVSS 5.3 v3.1) affecting Swagger Ui (Smartbear), @fastify/swagger-ui (npm), fastify-swagger-ui.
  • It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
  • EPSS estimates a 2.3% probability of exploitation in the next 30 days.
  • Fixed versions are available, including @fastify/swagger-ui 2.1.0, Swagger Ui 2.1.0.
  • Brandefense priority: routine patching, as no exploitation is known and its severity is moderate or low.

CVSS v3.1

5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS (30-day exploit likelihood)

2.3%

Higher than 82.9% of all scored CVEs

Exploited in the wild

No known

Not in a known-exploited catalog

Public exploit code

None known

Get the full CVE-2024-22207 brief as a PDF

Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.

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

3 affected entries in total
ProductAffected versionsFixed in
Swagger UiSmartbearSee advisory2.1.0
@fastify/swagger-uinpm>= 2.0.02.1.0
fastify-swagger-ui>= < 2.1.0n/a

Patched Releases

@fastify/swagger-ui

2.1.0

Swagger Ui

2.1.0

Timeline

  1. Publicly disclosed

    Jan 16, 2024

  2. Last updated

    Sep 10, 2026

Weakness Type

  • CWE-1188 Initialization of a Resource with an Insecure Default

References

3 more references in the full CVE brief

FAQ

Common Questions.

Is CVE-2024-22207 Running On Your Attack Surface?

Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.

Request A Demo