CVE-2024-22207: fastify fastify-swagger-ui
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 82.9% of scored vulnerabilities.
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
83%
Versus all other CVEs
30-day change
0.00 pp
From 2.29% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
@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