Information Exposure Affecting @fastify/swagger-ui package, versions <2.1.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
6.02% (94th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTIFYSWAGGERUI-6157561
  • published16 Jan 2024
  • disclosed15 Jan 2024
  • creditNick O'Leary

Introduced: 15 Jan 2024

CVE-2024-22207  (opens in a new tab)
CWE-200  (opens in a new tab)

How to fix?

Upgrade @fastify/swagger-ui to version 2.1.0 or higher.

Overview

@fastify/swagger-ui is a Serve Swagger-ui for Fastify

Affected versions of this package are vulnerable to Information Exposure due to the default configuration not setting the baseDir, which results in the exposure of all files in the module's directory via HTTP routes served by the module. An attacker can access sensitive information by navigating to these exposed routes.

CVSS Scores

version 3.1