CVE-2024-22207

Default swagger-ui configuration exposes all files in the module

MEDIUM
5.3
CVSS Score
Published: January 15, 2024 at 03:40 PM UTC
Updated: June 17, 2026 at 07:10 AM UTC
2 products affected across 2 vendorsSwagger UISwagger UI

Using fastify-swagger-ui by fastify?

Get instant alerts when new vulnerabilities affect fastify-swagger-ui - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 2%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.0.0 ≤ v < 2.1.0
Affected range stops below 2.1.0, so it looks safe — our inference, not a vendor statement
v < 2.1.0
Affected range stops below 2.1.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-1188

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card