Default swagger-ui configuration exposes all files in the module
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fastify | fastify-swagger-ui | before 2.1.0 | 2.1.0 | Patch available | CNA |
| — | @fastify/swagger-ui (npm) | 2.0.0 to before 2.1.0 | 2.1.0 | Patch available | GHSA-62jr-84gf-wmg4 |
- fastify-swagger-ui Vendorfastify Affected before 2.1.0 Fixed in 2.1.0 Patch available CNA
- @fastify/swagger-ui (npm) Vendor— Affected 2.0.0 to before 2.1.0 Fixed in 2.1.0 Patch available GHSA-62jr-84gf-wmg4
Remediation
- Fix · CNA fastify-swagger-ui (fastify) Fixed in 2.1.0
- Fix · GHSA-62jr-84gf-wmg4 @fastify/swagger-ui (npm) Fixed in 2.1.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-22207
- 2026-10-03 Alias added: GHSA-62jr-84gf-wmg4
References
Patch 1
Advisory 2
More fastify vulnerabilities
- TI-2026-26180 @fastify/express vulnerable to middleware authentication bypass via URL normalization… CVSS 4.0CRITICAL 9.1
- TI-2026-26179 @fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
- TI-2026-26177 @fastify/reply-from vulnerable to connection header abuse enabling stripping of proxy-added headers CVSS 4.0CRITICAL 9.0
- TI-2026-05498 @fastify/middie vulnerable to middleware authentication bypass in child plugin scopes CVSS 3.1CRITICAL 9.1
- TI-2023-15307 Cross-site request forgery in npm @fastify/oauth2 CVSS 3.1HIGH 8.8
- TI-2022-18664 Denial of service in Fastify via Content-Type header CVSS 3.1HIGH 7.5
Sources
- CVE-2024-22207 · CVE Program
- CVE-2024-22207 · NVD
- FIRST EPSS
- GHSA-62jr-84gf-wmg4 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences