Server-side Request Forgery (SSRF) Affecting swagger-ui-express package, versions <4.3.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
0.15% (53rd 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 Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-SWAGGERUIEXPRESS-6815423
  • published9 May 2024
  • disclosed9 Dec 2021
  • creditUnknown

Introduced: 9 Dec 2021

CVE-2021-46708  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade swagger-ui-express to version 4.3.0 or higher.

Overview

swagger-ui-express is a module that allows you to serve auto-generated swagger-ui generated API docs from express, based on a swagger.json file.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the ?url parameter, which was intended to allow displaying remote OpenAPI definitions. This functionality may pose a risk for users who host their own SwaggerUI instances. In particular, including remote OpenAPI definitions opens a vector for phishing attacks by abusing the trusted names/domains of self-hosted instances.

NOTE: This vulnerability has also been identified as: CVE-2018-25031

CVSS Scores

version 3.1