Every CVE Search/ Get API key

CVE-2016-5682

Cross-Site Scripting in swagger-ui

6.1 MediumFix available

CVE-2016-5682 is a medium vulnerability (CVSS 6.1) in Smartbear Swagger-ui, published April 10, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.03%, the 63rd percentile. Fixed in swagger-ui 2.2.1.

Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

1.03%Up 0.1 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 6.1

Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.

Record
CVE-2016-5682
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:P/A:N
Weakness
CWE-79
Updated
2026-11-02
CVE List No score

Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.

Record
CVE-2016-5682
Updated
2026-11-02
EUVDEUVD-2020-1192 No score

Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.

Record
EUVD-2020-1192
Updated
2026-11-03
GitHub AdvisoriesGHSA-p239-93f7-h6xf No score

Cross-Site Scripting in swagger-ui

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.

Record
GHSA-p239-93f7-h6xf
Weakness
CWE-79
Updated
2026-11-02
OSV 6.1

Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.

Record
CVE-2016-5682
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-p239-93f7-h6xf No score

Cross-Site Scripting in swagger-ui

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.

Record
GHSA-p239-93f7-h6xf
Weakness
CWE-79
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
swagger-ui
npm
through 2.2.0
2.2.1
swagger-ui
npm
before 2.2.1
2.2.1

History

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, GitHub Advisories, NVD, OSV

References

MoveEnter Open