Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3.1, published 20 June 2019.
- Which products and versions are affected?
- swagger-ui (npm) SEMVER:introduced=0,fixed=3.18.0.
- Is there a fix for This vulnerability?
- Yes. swagger-ui (npm): upgrade to 3.18.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- 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 3.18.0 or later
npm install swagger-ui@3.18.0
Technical details
The vulnerability is a reverse tabnapping flaw (CWE-1022) in Swagger UI's anchor tag implementation. When anchor tags open links in new tabs/windows using target="_blank" without rel="noopener noreferrer" attributes, the newly opened page gains access to the window.opener property of the original page, allowing attackers to redirect users back to a phishing site. The flaw requires user interaction (clicking a link) but has a network attack vector since the malicious link can be hosted externally. The fix, released in version 3.18.0, replaces unsafe anchor tags with proper Link components that include the necessary security attributes.
Affected products
- Swagger API Swagger UI prior to 3.18.0
Timeline
- 2019-06-20: disclosed
- 2019-06-20: patched: Fix released in version 3.18.0