CVE-2016-5682
Cross-Site Scripting in swagger-ui
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
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 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - CVSS 2.0
- 4.3 Medium
AV: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 Medium
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
swagger-uinpm |
through 2.2.0 | 2.2.1 |
swagger-uinpm |
before 2.2.1 | 2.2.1 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
community.rapid7.com/community/infosec/blog/2016/09/02/r7-2016-19-persistent-xss-via-unescaped-parameters-in-swagger-ui
github.com/swagger-api/swagger-ui/issues/1865
npmjs.com/advisories/126
nvd.nist.gov/vuln/detail/CVE-2016-5682
github.com/advisories/GHSA-p239-93f7-h6xf
github.com/swagger-api/swagger-ui