Cross-Site Scripting in swagger-ui
        
  Critical severity
        
          GitHub Reviewed
      
        Published
          Sep 1, 2020 
          to the GitHub Advisory Database
          •
          Updated Jan 9, 2023 
      
  
Description
        Reviewed
      Aug 31, 2020 
    
  
        Published to the GitHub Advisory Database
      Sep 1, 2020 
    
  
        Last updated
      Jan 9, 2023 
    
  
Affected versions of
swagger-uiare vulnerable to cross-site scripting in both theconsumesandproducesparameters of the swagger JSON document for a given API.Additionally,
swagger-uiallows users to load arbitrary swagger JSON documents via the query string parameterurl, allowing an attacker to exploit this attack against any user that the attacker can convince to visit a crafted link.Proof of Concept
Recommendation
Update to version 2.2.1 or later.
References