CVE-2024-22207 json
Default swagger-ui configuration exposes all files in the module
published 2024-01-15 2 y ago modified 2026-09-10 1 mo ago also GHSA-62jr-84gf-wmg4 , EUVD-2024-0266
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.3%
- EPSS 2.3% chance of exploitation in 30 days, percentile 83%
- public exploits
- 0
- none known, plus a Nuclei check
Summary
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.
Patch / fix
- npm @fastify/swagger-ui 2.1.0
- smartbear swagger_ui 2.1.0
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 16 mo ago
Exploit prediction
2.29% chance of exploitation in the next 30 days, higher than 83% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- Nuclei template Fastify Swagger-UI - Information Disclosure nuclei detection template
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @fastify/swagger-ui | >=2.0.0, <2.1.0 |
2.1.0 |
Affected products
- fastify fastify-swagger-ui
Classification
- Weakness
-
- CWE-1188 Initialization of a Resource with an Insecure Default
References
-
github.com
/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7
web, patch
-
github.com
/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4
web, vendor-advisory
- security.netapp.com /advisory/ntap-20240216-0002/
-
nvd.nist.gov
/vuln/detail/CVE-2024-22207
advisory
-
github.com
/fastify/fastify-swagger-ui
package
-
security.netapp.com
/advisory/ntap-20240216-0002
web
Sources
- CVE List CVE-2024-22207
- GitHub Advisory GHSA-62jr-84gf-wmg4
- NVD CVE-2024-22207
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.