Skip to content

Cross-Site Scripting in swagger-ui

Critical severity GitHub Reviewed Published Sep 1, 2020 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm swagger-ui (npm)

Affected versions

<= 2.2.0

Patched versions

2.2.1

Description

Affected versions of swagger-ui contain a cross-site scripting vulnerability in the key names of a specific nested object in the JSON document.

Proof of Concept

The vulnerable object structure is:

{
    "definitions": {
        "arbitraryVal": {
            "properties": {
                "<INJECTABLE_KEY_NAME>": "LoremIpsum"
                }
            }
        }
}

Malicious JSON documents can be loaded in by providing a URL to them in the url query string parameter.

Recommendation

Update to version 2.2.1 or later.

References

Reviewed Aug 31, 2020
Published to the GitHub Advisory Database Sep 1, 2020
Last updated Jan 9, 2023

Severity

Critical

EPSS score

0.080%
(36th percentile)

Weaknesses

CVE ID

CVE-2016-5682

GHSA ID

GHSA-p239-93f7-h6xf
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.