Vulnerability DatabaseGHSA-w992-2gmj-9xxj

GHSA-w992-2gmj-9xxj
JavaScript vulnerability analysis and mitigation

Overview

A Cross-Site Scripting (XSS) vulnerability was identified in swagger-ui versions prior to 2.2.1. The vulnerability was discovered on January 15, 2015, and was published to the GitHub Advisory Database on September 11, 2020. The issue affects the swagger-ui npm package, specifically in how it handles HTML code in the swagger.apiInfo.description value (GitHub Advisory).

Technical details

The vulnerability stems from improper sanitization of HTML code in the swagger.apiInfo.description value, which could allow for arbitrary JavaScript execution. The issue was classified with a Moderate severity rating and is categorized under CWE-79 (Cross-Site Scripting). The vulnerability was initially identified through testing that demonstrated the ability to inject and execute JavaScript code through the description field (Swagger Issue).

Impact

When exploited, this vulnerability could allow attackers to execute arbitrary JavaScript code in the context of users viewing the Swagger UI documentation. This could potentially lead to session hijacking, data theft, or other malicious actions typically associated with XSS attacks (GitHub Advisory).

Exploitability

The vulnerability was initially discovered through testing that demonstrated the ability to inject JavaScript code via the description field. The issue was considered 'by design' as some implementations, such as swagger-node-express, were utilizing this HTML capability for legitimate purposes like adding links to descriptions (Swagger Issue).

Mitigation and workarounds

The recommended mitigation is to upgrade to swagger-ui version 2.2.1 or later, which addresses this vulnerability. Prior to the fix, users were advised to be careful with the swagger.apiInfo.description value and consider using markdown for description values instead of HTML (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-49250HIGH8.7
  • JavaScript logoJavaScript
  • @conform-to/dom
NoYesSep 14, 2026
CVE-2026-55091HIGH7.5
  • JavaScript logoJavaScript
  • flat-to-nested
NoYesSep 14, 2026
CVE-2026-59960HIGH7.5
  • JavaScript logoJavaScript
  • @argos-ci/core
NoYesSep 14, 2026
CVE-2026-54150MEDIUM6.9
  • JavaScript logoJavaScript
  • next-video
NoYesSep 14, 2026
CVE-2026-57583LOW3.3
  • JavaScript logoJavaScript
  • @openzeppelin/wizard
NoYesSep 14, 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