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

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.21%, higher than 89% of CVEs (2026-11-30)
- Published: 2024-01-15T15:40:35.252Z
- Modified: 2026-09-10T03:50:04.794Z
- Also known as: GHSA-62jr-84gf-wmg4
- Weaknesses: CWE-1188
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- fastify fastify-swagger-ui: < 2.1.0
- @fastify/swagger-ui (npm): from 2.0.0 before 2.1.0
- smartbear swagger_ui: from 2.0.0 before 2.1.0

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

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

## Sources

- CVE List: [CVE-2024-22207](https://www.cve.org/CVERecord?id=CVE-2024-22207), CVE Terms of Use, modified 2025-06-17
- GitHub Advisory Database: [GHSA-62jr-84gf-wmg4](https://github.com/advisories/GHSA-62jr-84gf-wmg4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-22207](https://nvd.nist.gov/vuln/detail/CVE-2024-22207), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-22207 · Whole record: https://cve.day/CVE-2024-22207.json · Rebuilt by cve.day 2026-11-25T22:58:36.120Z
