# CVE-2024-22207: Default swagger-ui configuration exposes all files in the module

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-01-15 · Modified: 2025-06-17
- Aliases: GHSA-62jr-84gf-wmg4
- Record: https://cvemate.com/vulnerability/CVE-2024-22207 · JSON: https://cvemate.com/vulnerability/CVE-2024-22207/json

## Description

```text
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.
```

## Signals

- CVSS: 5.3 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- EPSS: 2.29%, percentile 83.802%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- fastify fastify-swagger-ui: \< 2.1.0
- @fastify swagger-ui (Npm): ≥ 2.0.0, \< 2.1.0
- smartbear swagger\_ui: ≥ 2.0.0, \< 2.1.0

## References

- <https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4>
- <https://github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7>
- <https://security.netapp.com/advisory/ntap-20240216-0002/>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-22207>
- <https://github.com/fastify/fastify-swagger-ui>
- <https://security.netapp.com/advisory/ntap-20240216-0002>

---

Data as of 2026-12-05T08:28:26.856Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
