{"id":"CVE-2024-22207","published":"2024-01-15T15:40:35Z","modified":"2025-06-17T14:34:45Z","title":"Default swagger-ui configuration exposes all files in the module","vendor":"fastify","product":"fastify-swagger-ui","tier":"tail","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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0229,"percentile":0.83649,"provenance":"source"},"cwes":[{"id":"CWE-1188","name":"Initialization of a Resource with an Insecure Default"}],"references":[{"url":"https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0002/","tags":[]}],"priority":{"score":25.4,"factors":[{"name":"EPSS percentile","points":16.73},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.71}]},"exploitSources":{"nuclei":[{"id":"CVE-2024-22207","name":"Fastify Swagger-UI - Information Disclosure","severity":"medium","path":"http/cves/2024/CVE-2024-22207.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-22207.yaml"}],"provenance":"source"},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify-swagger-ui","versions":["< 2.1.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-06-17T14:34:31.540245Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@fastify/swagger-ui","vulnerableRanges":[">=2.0.0, <2.1.0"],"patched":["2.1.0"],"from":["GHSA-62jr-84gf-wmg4"],"provenance":"source"}],"summary":{"text":"The fastify-swagger-ui plugin for Fastify, which serves Swagger UI, has an insecure default: prior to version 2.1.0, its default configuration without the baseDir option set exposes all files in the module's directory over the HTTP routes it serves. An unauthenticated remote attacker with network access can request these files directly, with no user interaction or special configuration required, unless the baseDir option is explicitly set.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:01Z"},"euvd":{"id":"EUVD-2024-0266","exploited":false,"provenance":"source"}}