CVE-2024-22207: medium-severity vulnerability in fastify-swagger-ui
Default swagger-ui configuration exposes all files in the module
Published · Updated
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
Patch soon. It has a working public exploit.
The fastify-swagger-ui plugin exposes all files in its directory through HTTP by default, allowing attackers to access sensitive files that should be private. Updating to version 2.1.0 or configuring the baseDir option fixes this issue.
fastify-swagger-ui versions prior to 2.1.0 lack proper path restriction in the default configuration, enabling directory traversal attacks where HTTP requests can retrieve arbitrary files from the module directory. This requires the plugin to be active with default settings, and impacts confidentiality by exposing source code, configuration, and other sensitive module files.