Vulnerability DatabaseGHSA-g336-c7wv-8hp3

GHSA-g336-c7wv-8hp3
JavaScript vulnerability analysis and mitigation

Overview

A critical cross-site scripting (XSS) vulnerability was identified in swagger-ui versions prior to 2.2.1. The vulnerability was discovered in September 2015 and officially published to the GitHub Advisory Database on September 1, 2020. The issue affects the swagger-ui npm package and allows for XSS attacks through the URL query string parameter (GitHub Advisory).

Technical details

The vulnerability stems from improper sanitization of the URL parameter in the message bar functionality. The issue was initially fixed but was reintroduced in version 2.1.0-M1 when the code reverted from using .text() to .html() for handling URL data, allowing potential XSS payloads to be executed (Swagger Issue). The vulnerability is tracked as GHSA-g336-c7wv-8hp3 and is classified as CWE-79 (Cross-site Scripting) with a Critical severity rating (GitHub Advisory).

Impact

This vulnerability could allow attackers to execute arbitrary JavaScript code in the context of users' browsers who visit a maliciously crafted URL. This could potentially lead to theft of sensitive information, session hijacking, or other client-side attacks (GitHub Advisory).

Exploitability

The vulnerability can be exploited by crafting a malicious URL that includes JavaScript code in the query string parameter. The issue was confirmed to be exploitable in versions prior to 2.2.1, with proof-of-concept demonstrations showing successful XSS execution through the URL parameter (Swagger Issue).

Mitigation and workarounds

The recommended mitigation is to update swagger-ui to version 2.2.1 or later, which includes the security fix for this vulnerability. The fix implements proper sanitization of the URL parameter to prevent XSS attacks (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-2026-54155HIGH7.7
  • JavaScript logoJavaScript
  • node-opcua
NoNoAug 20, 2026
CVE-2026-54156HIGH7.5
  • JavaScript logoJavaScript
  • node-opcua
NoYesAug 20, 2026
CVE-2026-55451MEDIUM6.9
  • JavaScript logoJavaScript
  • gettext-converter
NoYesAug 20, 2026
CVE-2026-54150MEDIUM6.9
  • JavaScript logoJavaScript
  • next-video
NoYesAug 20, 2026
GHSA-ghvf-qf6h-g8x5HIGHN/A
  • JavaScript logoJavaScript
  • @nocobase/server
NoYesAug 20, 2026

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