CVE-2021-46708: Spoofing attack in swagger-ui-dist
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.40582%
CWE
Published
3/12/2022
Updated
1/27/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
swagger-ui-dist | npm | < 4.1.3 | 4.1.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The CWE-1021 indicates improper frame/UI layer restrictions. The vulnerability describes clickjacking through malicious site embedding. swagger-ui-dist
versions <4.1.3 likely contained an index.html
file without: 1) frame-breaker scripts checking window.top
!== window.self
2) proper X-Frame-Options headers. The patched version 4.1.3 would have added these protections. While exact pre-patch code isn't available, the vulnerability pattern strongly matches missing frame protection in the main
UI entry point.