
Cloud Vulnerability DB
A community-led vulnerabilities database
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).
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).
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).
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).
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).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."