GHSA-p239-93f7-h6xf

Suggest an improvement
Source
https://github.com/advisories/GHSA-p239-93f7-h6xf
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-p239-93f7-h6xf/GHSA-p239-93f7-h6xf.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-p239-93f7-h6xf
Aliases
Published
2020-09-01T15:30:58Z
Modified
2023-11-08T03:58:31Z
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.

Database specific
{
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:11:42Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
}
References

Affected packages

npm / swagger-ui

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.2.1

Database specific

last_known_affected_version_range
"<= 2.2.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-p239-93f7-h6xf/GHSA-p239-93f7-h6xf.json"