Vulnerability DatabaseGHSA-388g-jwpg-x6j4

GHSA-388g-jwpg-x6j4
JavaScript vulnerability analysis and mitigation

Overview

A Cross-Site Scripting (XSS) vulnerability was identified in swagger-ui versions prior to 3.0.13. The vulnerability was discovered on June 1, 2017, and published to the GitHub Advisory Database on September 11, 2020. Swagger-ui, a library that allows interaction and visualization of APIs, was found to be susceptible to XSS attacks due to insufficient sanitization of YAML files that could be imported from URLs or copied-pasted directly into the editor (GitHub Advisory, Snyk Report).

Technical details

The vulnerability is tracked as GHSA-388g-jwpg-x6j4 and has been assigned a CVSS v3.1 score of 6.5 (Moderate severity). The CVSS metrics indicate a Network attack vector, Low attack complexity, No privileges required, Required user interaction, Unchanged scope, High confidentiality impact, and No impact on integrity or availability. The vulnerability is categorized as CWE-79, which relates to improper neutralization of input during web page generation (GitHub Advisory).

Impact

The vulnerability allows attackers to execute arbitrary JavaScript through maliciously crafted YAML files. This could lead to the exposure of sensitive information, cookie theft, session hijacking, and potential delivery of malware. The impact primarily affects the confidentiality of the system, with no direct impact on integrity or availability (Snyk Report).

Exploitability

The vulnerability can be triggered by providing a YAML file with a malicious description field, either through URL import or direct copy-paste into the editor. A proof of concept was demonstrated on http://editor.swagger.io/# where an alert popup could be triggered through a specially crafted YAML file (GitHub Issue, Snyk Report).

Mitigation and workarounds

The recommended mitigation is to upgrade swagger-ui to version 3.0.13 or later, which contains the fix for this vulnerability. The patch addresses the XSS vulnerability by properly sanitizing YAML files before processing them (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2021-43309HIGH7.5
  • JavaScript logoJavaScript
  • uri-template-lite
NoYesAug 24, 2022
CVE-2022-24375HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 24, 2022
CVE-2022-25231HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 23, 2022
CVE-2022-21208HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 23, 2022
CVE-2022-2932MEDIUM6.1
  • JavaScript logoJavaScript
  • mobiledoc-kit
NoYesAug 22, 2022

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management