GitHub Advisoryadvisory · npm
GHSA-x9p2-fxq6-2m5f Reverse Tabnapping in swagger-ui
MEDIUM
Official page ↗
- Ecosystem
- npm
- Packages
- swagger-ui
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
- Weaknesses
- CWE-1022
- Reviewed
- 2019-06-20
Affected packages
• npm swagger-ui: < 3.18.0 → fixed in 3.18.0
Description
Versions of `swagger-ui` prior to 3.18.0 are vulnerable to Reverse Tabnapping. The package uses `target='_blank'` in anchor tags, allowing attackers to access `window.opener` for the original page. This is commonly used for phishing attacks.
Recommendation
Upgrade to version 3.18.0 or later.
Related
Weakness · CWE (1)
- CWE-1022 Use of Web Link to Untrusted Target with window.opener Access weakness
References
- https://github.com/swagger-api/swagger-ui/pull/4789 web
- https://github.com/swagger-api/swagger-ui/commit/3f4cae3334fdd492a373f4453bd03a9ebd87becf web
- https://github.com/swagger-api/swagger-ui/releases/tag/v3.18.0 web
- https://snyk.io/vuln/SNYK-JS-SWAGGERUI-449808 web
- https://www.npmjs.com/advisories/975 web