Advisory

GHSA-p239-93f7-h6xf

Also known as: CVE-2016-5682

Summary

Cross-Site Scripting in swagger-ui

Details

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.

Recommendation

Update to version 2.2.1 or later.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2020-09-01 15:30 UTC
Modified
2023-11-08 03:58 UTC

Affected packages and fixes

swagger-ui

npm · All systems

Affected

  • introduced 0, fixed 2.2.1 (semver)

Fixed versions

2.2.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences