CVE-2024-22207: Default swagger-ui configuration exposes all files in the module
Vulnerability summary
CVE-2024-22207 is a medium (CVSS 5.3) vulnerability in fastify fastify-swagger-ui. EPSS estimates a 2.29% chance of exploitation in the next 30 days, higher than 83.8% of scored vulnerabilities.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 15-01-2024PublishedVulnerability first disclosed.
- 17-06-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · NpmEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- NVDNIST5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS trend
Probability
2.29%
Chance of exploitation in the next 30 days
Percentile
84%
Versus all other CVEs
30-day change
No change 0.00 pp
From 2.29% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
@fastify1 product
- swagger-ui≥ 2.0.0, < 2.1.0
Fastify1 product
- fastify-swagger-ui< 2.1.0
Smartbear1 product
- swagger_ui≥ 2.0.0, < 2.1.0
3 vendors · 3 products
References
6 links- github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4X Refsource CONFIRMWEBVendor Advisory
- github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7X Refsource MISCWEBPatch