{"id":"CVE-2024-22207","aliases":["EUVD-2024-0266","GHSA-62jr-84gf-wmg4"],"status":"published","title":"Default swagger-ui configuration exposes all files in the module","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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.0229,"percentile":0.83458,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1188"],"published":"2024-01-15T15:40:35Z","modified":"2026-10-28T02:31:08Z","exploits":[{"source":"nuclei","id":"CVE-2024-22207","title":"Fastify Swagger-UI - Information Disclosure","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-22207.yaml"}],"fixes":[{"ecosystem":"npm","package":"@fastify/swagger-ui","fixed_in":["2.1.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@fastify/swagger-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.1.0"}]}]},{"source":"osv","ecosystem":"npm","package":"@fastify/swagger-ui","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.1.0"}]}]}],"products":[{"vendor":"fastify","product":"fastify-swagger-ui"},{"vendor":"smartbear","product":"swagger_ui"}],"references":[{"url":"https://github.com/fastify/fastify-swagger-ui/security/advisories/GHSA-62jr-84gf-wmg4","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/fastify/fastify-swagger-ui/commit/13d799a2c5f14d3dd5b15892e03bbcbae63ee6f7","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0002/","tags":["x_transferred","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22207","tags":["advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20240216-0002","tags":["web"]},{"url":"https://github.com/advisories/GHSA-62jr-84gf-wmg4"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/22xxx/CVE-2024-22207.json","tags":["advisory"]},{"url":"https://github.com/fastify/fastify-swagger-ui","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-22207","title":"Default swagger-ui configuration exposes all files in the module","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.","status":"published","published":"2024-01-15T15:40:35.252Z","modified":"2025-06-17T14:34:45.374Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-1188"],"updated_at":"2026-11-02T14:33:59.884489Z"}],"euvd":[{"id":"EUVD-2024-0266","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.","status":"published","published":"2024-01-15T15:40:35Z","modified":"2025-06-17T14:34:45Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T20:32:22.732364Z"}],"ghsa":[{"id":"GHSA-62jr-84gf-wmg4","title":"Default swagger-ui configuration exposes all files in the module","description":"### 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).","status":"published","published":"2024-01-16T15:24:41Z","modified":"2024-02-16T15:30:26Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-1188"],"updated_at":"2026-11-02T14:37:38.20753Z"}],"nvd":[{"id":"CVE-2024-22207","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.","status":"published","published":"2024-01-15T16:15:13.437Z","modified":"2026-06-17T07:10:56.7Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-1188"],"updated_at":"2026-11-02T14:09:30.070039Z"}],"osv":[{"id":"CVE-2024-22207","title":"Default swagger-ui configuration exposes all files in the module","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.","status":"published","published":"2024-01-15T15:40:35.252Z","modified":"2026-10-28T02:31:08.454482921Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-1188"],"updated_at":"2026-11-02T15:44:38.577405Z"},{"id":"GHSA-62jr-84gf-wmg4","title":"Default swagger-ui configuration exposes all files in the module","description":"### 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).","status":"published","published":"2024-01-16T15:24:41Z","modified":"2026-09-10T03:50:04.794495794Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-1188"],"updated_at":"2026-11-02T15:46:38.911014Z"}]}}
