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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    5.09% (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 ID SNYK-JS-FASTIFYSWAGGERUI-6157561
  • published 16 Jan 2024
  • disclosed 15 Jan 2024
  • credit Nick O'Leary

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
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    None
  • Availability (A)
    None
Expand this section

NVD

5.3 medium