{"id":"CVE-2024-22207","aliases":["CVE-2024-22207","GHSA-62jr-84gf-wmg4"],"related":[],"kind":"vulnerability","state":"published","title":"Default swagger-ui configuration exposes all files in the module","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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe 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.\n\n### Patches\n\nUpdate to v2.1.0\n\n### Workarounds\n\nUse  the `baseDir` option\n\n### References\n\n[HackerOne report\n](https://hackerone.com/reports/2312369).","format":"markdown","source":"ghsa"},{"lang":"es","text":"fastify-swagger-ui es un complemento de Fastify para servir la interfaz de usuario de Swagger. Antes de 2.1.0, la configuración predeterminada de `@fastify/swagger-ui` sin `baseDir` configurado hará que todos los archivos en el directorio del módulo queden expuestos a través de rutas http servidas por el módulo. La vulnerabilidad se solucionó en v2.1.0. Configurar la opción `baseDir` también puede solucionar esta vulnerabilidad.","source":"nvd"}],"published":"2024-01-15T15:40:35.252Z","modified":"2026-09-10T03:50:04.794Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-1188"],"affected":[{"ranges":[{"version":"< 2.1.0","status":"affected"}],"vendor":"fastify","product":"fastify-swagger-ui","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.1.0"}],"ecosystem":"npm","package":"@fastify/swagger-ui","purl":"pkg:npm/%40fastify/swagger-ui","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.0","fixed":"2.1.0"}],"vendor":"smartbear","product":"swagger_ui","cpe":"cpe:2.3:a:smartbear:swagger_ui:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0002/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22207","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fastify/fastify-swagger-ui","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0002","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-06-17T14:34:31.540Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-22207","url":"https://www.cve.org/CVERecord?id=CVE-2024-22207","licence":"CVE Terms of Use","modified":"2025-06-17T14:34:45.374Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-62jr-84gf-wmg4","url":"https://github.com/advisories/GHSA-62jr-84gf-wmg4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:04.794Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-22207","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22207","licence":"Public domain","modified":"2026-06-17T07:10:56.700Z"}],"updatedAt":"2026-11-25T22:58:36.120Z","epss":{"score":0.03215,"percentile":0.88981,"date":"2026-11-30T12:00:22.000Z"}}