Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @fastify/swagger-ui
  4. ›
  5. CVE-2024-22207

CVE-2024-22207: Insecure Default Initialization of Resource

January 16, 2024

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.

References

  • github.com/advisories/GHSA-62jr-84gf-wmg4
  • github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7
  • github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4
  • nvd.nist.gov/vuln/detail/CVE-2024-22207

Code Behaviors & Features

Detect and mitigate CVE-2024-22207 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.0.0 before 2.1.0

Fixed versions

  • 2.1.0

Solution

Upgrade to version 2.1.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-1188: Initialization of a Resource with an Insecure Default

Source file

npm/@fastify/swagger-ui/CVE-2024-22207.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:57 +0000.