CVE-2024-22207
MediumDefault 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| Product | Affected versions | Fixed in |
|---|---|---|
| Swagger UiSmartbear | See advisory | 2.1.0 |
| @fastify/swagger-uinpm | >= 2.0.0 | 2.1.0 |
| fastify-swagger-ui | >= < 2.1.0 | n/a |
Patched Releases
@fastify/swagger-ui
2.1.0
Swagger Ui
2.1.0
Timeline
Publicly disclosed
Jan 16, 2024
Last updated
Sep 10, 2026
Weakness Type
- CWE-1188 Initialization of a Resource with an Insecure Default
References
- advisoryGHSA advisory
- advisoryhttps://github.com/CVEProject/cvelistV5/tree/main/cves/2024/22xxx/CVE-2024-22207.json
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2024-22207
- articlehttps://github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7
- articlehttps://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4
FAQ
Common Questions.
fastify-swagger-ui is a Fastify plugin for serving Swagger UI.
Affected: Swagger Ui (Smartbear); @fastify/swagger-ui (npm) versions >= 2.0.0; fastify-swagger-ui versions >= < 2.1.0. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
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.
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