Wiz Agents & Workflows are here
Vulnerability DatabaseCVE-2016-1000226

CVE-2016-1000226
JavaScript vulnerability analysis and mitigation

Overview

Swagger-UI versions prior to 2.2.1 were found to be vulnerable to cross-site scripting (XSS) attacks through the 'consumes' and 'produces' parameters in the swagger JSON document. The vulnerability was discovered and disclosed in January 2016, affecting all versions of swagger-ui before version 2.2.1 (GitHub Advisory).

Technical details

The vulnerability exists in both the 'consumes' and 'produces' parameters of the swagger JSON document for a given API. The content types in these parameters were not properly escaped, allowing for XSS payload injection. Additionally, swagger-ui allows users to load arbitrary swagger JSON documents via the query string parameter 'url', which expands the attack surface by allowing attackers to exploit this vulnerability against any user who can be convinced to visit a crafted link (GitHub Advisory).

Impact

The vulnerability allows attackers to execute arbitrary JavaScript code in the context of the victim's browser when they view a maliciously crafted Swagger documentation page. This is particularly concerning as swagger-ui allows loading of arbitrary swagger JSON documents via URL parameters, making it possible to target any user who can be convinced to visit a specially crafted link (GitHub Advisory).

Mitigation and workarounds

The recommended mitigation is to update to swagger-ui version 2.2.1 or later, which includes a fix for this vulnerability. The fix was implemented through proper escaping of content types in the affected parameters (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-34220CRITICAL9.3
  • JavaScriptJavaScript
  • @mikro-orm/core
NoYesMar 29, 2026
CVE-2026-34221HIGH8.3
  • JavaScriptJavaScript
  • @mikro-orm/core
NoYesMar 29, 2026
GHSA-7fqq-q52p-2jjgMEDIUM6.5
  • JavaScriptJavaScript
  • opencc
NoYesMar 29, 2026
CVE-2026-34224LOW2.1
  • JavaScriptJavaScript
  • parse-server
NoYesMar 29, 2026
GHSA-53p3-c7vp-4mccLOW2.1
  • JavaScriptJavaScript
  • action_text-trix
NoYesMar 29, 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