Quick answers
- Is CVE-2016-1000229 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2016-1000229 being exploited in the wild.
- How severe is CVE-2016-1000229?
- Low severity, with a CVSS score of 3.1, published 24 May 2022.
- Which products and versions are affected?
- swagger-ui (npm) SEMVER:introduced=0,fixed=2.2.1.
- Is there a fix for CVE-2016-1000229?
- Yes. swagger-ui (npm): upgrade to 2.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2016-1000229 attacked?
- It is attacked over the network.
- Am I affected by CVE-2016-1000229?
- Check whether you run swagger-ui (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- swagger-ui (npm): upgrade to 2.2.1 or later
npm install swagger-ui@2.2.1
Technical details
The vulnerability is a Cross-Site Scripting (CWE-79) flaw in swagger-ui's handling of JSON key names during web page generation. The library fails to properly neutralize or escape key names from JSON documents before rendering them in the HTML response. An attacker can craft a malicious JSON file with script tags embedded in object keys; when this file is loaded (either directly or via URL query-string parameter), the unescaped keys are rendered as HTML, causing the scripts to execute. The attack requires user interaction (visiting a link to the malicious documentation) but no authentication. Affected versions are all releases prior to 2.2.1.
Affected products
- Swagger swagger-ui prior to 2.2.1
Identifiers
- CVE-2016-1000229
- GHSA-h8wp-wgcq-qhrf
Timeline
- 2019-12-20: disclosed
- 2022-05-24: patched: advisory published; fix available in version 2.2.1
- 2022-05-24: advisory