CVE-2024-22207 json
Default swagger-ui configuration exposes all files in the module
published 2y ago modified 2mo ago also EUVD-2024-0266 , GHSA-62jr-84gf-wmg4
- 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
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
Is CVE-2024-22207 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- last yr.
Exploit prediction
2.29% chance of exploitation in the next 30 days, higher than 83% of all scored CVEs (FIRST EPSS, 2026-11-11).
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 |
| GitHub | 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 |
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, 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
- Maintainer advisory GHSA-62jr-84gf-wmg4
Fencer Intel 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.
The maintainers of fastify/fastify-swagger-ui published their own advisory on GitHub. Reviewed sources take precedence over it.