{"id":"CVE-2016-5682","aliases":["EUVD-2020-1192","GHSA-p239-93f7-h6xf"],"status":"published","title":"Cross-Site Scripting in swagger-ui","description":"Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.01028,"percentile":0.63888,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2017-04-10T03:00:00Z","modified":"2026-10-24T10:30:56Z","fixes":[{"ecosystem":"npm","package":"swagger-ui","fixed_in":["2.2.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"swagger-ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.2.0"},{"fixed":"2.2.1"}]}]},{"source":"osv","ecosystem":"npm","package":"swagger-ui","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.2.1"}]}]}],"products":[{"vendor":"smartbear","product":"swagger-ui"}],"references":[{"url":"https://community.rapid7.com/community/infosec/blog/2016/09/02/r7-2016-19-persistent-xss-via-unescaped-parameters-in-swagger-ui","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/swagger-api/swagger-ui/issues/1865","tags":["web"]},{"url":"https://www.npmjs.com/advisories/126","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-5682","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-p239-93f7-h6xf"},{"url":"https://github.com/swagger-api/swagger-ui","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2016-5682","description":"Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.","status":"published","published":"2017-04-10T03:00:00Z","modified":"2024-08-06T01:08:00.436Z","updated_at":"2026-11-02T14:33:30.359814Z"}],"euvd":[{"id":"EUVD-2020-1192","description":"Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.","status":"published","published":"2017-04-10T03:00:00Z","modified":"2024-08-06T01:08:00Z","updated_at":"2026-11-03T02:22:42.006781Z"}],"ghsa":[{"id":"GHSA-p239-93f7-h6xf","title":"Cross-Site Scripting in swagger-ui","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.\n\n\n## Proof of Concept\nThe vulnerable object structure is:\n```\n{\n    \"definitions\": {\n        \"arbitraryVal\": {\n            \"properties\": {\n                \"\u003cINJECTABLE_KEY_NAME\u003e\": \"LoremIpsum\"\n                }\n            }\n        }\n}\n```\nMalicious JSON documents can be loaded in by providing a URL to them in the `url` query string parameter.\n\n\n\n## Recommendation\n\nUpdate to version 2.2.1 or later.","status":"published","published":"2020-09-01T15:30:58Z","modified":"2023-01-09T05:03:33Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:05.705235Z"}],"nvd":[{"id":"CVE-2016-5682","description":"Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.","status":"published","published":"2017-04-10T03:59:02.077Z","modified":"2026-06-17T00:49:52.03Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:03:37.238712Z"}],"osv":[{"id":"CVE-2016-5682","description":"Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.","status":"published","published":"2017-04-10T03:59:02.077Z","modified":"2026-10-24T10:30:56.243267279Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:02.776224Z"},{"id":"GHSA-p239-93f7-h6xf","title":"Cross-Site Scripting in swagger-ui","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.\n\n\n## Proof of Concept\nThe vulnerable object structure is:\n```\n{\n    \"definitions\": {\n        \"arbitraryVal\": {\n            \"properties\": {\n                \"\u003cINJECTABLE_KEY_NAME\u003e\": \"LoremIpsum\"\n                }\n            }\n        }\n}\n```\nMalicious JSON documents can be loaded in by providing a URL to them in the `url` query string parameter.\n\n\n\n## Recommendation\n\nUpdate to version 2.2.1 or later.","status":"published","published":"2020-09-01T15:30:58Z","modified":"2023-11-08T03:58:31.570959Z","cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:52.534897Z"}]}}
