# GHSA-x9p2-fxq6-2m5f: Reverse Tabnapping in swagger-ui

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2019-06-20T14:33:07.000Z
- Modified: 2021-08-16T23:44:47.000Z
- Weaknesses: CWE-1022

## Description

Versions of `swagger-ui` prior to 3.18.0 are vulnerable to [Reverse Tabnapping](https://www.owasp.org/index.php/Reverse_Tabnabbing). 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.

(As written by GitHub Advisory Database.)

## Affected

- swagger-ui (npm): before 3.18.0

## 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)

## Sources

- GitHub Advisory Database: [GHSA-x9p2-fxq6-2m5f](https://github.com/advisories/GHSA-x9p2-fxq6-2m5f), CC-BY-4.0, modified 2021-08-16

---

Page: https://cve.day/GHSA-x9p2-fxq6-2m5f · Whole record: https://cve.day/GHSA-x9p2-fxq6-2m5f.json · Rebuilt by cve.day 2026-11-25T22:56:47.003Z
