Naturally Processed Meals
Severity: critical

XSS in key names

swagger-ui

Overview

Affected versions of swagger-ui contain a cross-site scripting vulnerability in the key names of a specific nested object in the JSON document.

Proof of Concept

The vulnerable object structure is:

{
    "definitions": {
        "arbitraryVal": {
            "properties": {
                "<INJECTABLE_KEY_NAME>": "LoremIpsum"
                }
            }
        }
}

Malicious JSON documents can be loaded in by providing a URL to them in the url query string parameter.

Remediation

Update to version 2.2.1 or later.

Resources

Advisory timeline

  1. published

    Advisory published
    Jul 21st, 2016
  2. reported

    Jul 21st, 2016