ID GHSA-P239-93F7-H6XF Type github Reporter GitHub Advisory Database Modified 2021-09-23T21:32:17
Description
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.
{"id": "GHSA-P239-93F7-H6XF", "vendorId": null, "type": "github", "bulletinFamily": "software", "title": "Cross-Site Scripting in swagger-ui", "description": "Affected versions of `swagger-ui` contain a cross-site scripting vulnerability in the key names of a specific nested object in the JSON document.\n\n\n## Proof of Concept\nThe vulnerable object structure is:\n```\n{\n \"definitions\": {\n \"arbitraryVal\": {\n \"properties\": {\n \"<INJECTABLE_KEY_NAME>\": \"LoremIpsum\"\n }\n }\n }\n}\n```\nMalicious JSON documents can be loaded in by providing a URL to them in the `url` query string parameter.\n\n\n\n## Recommendation\n\nUpdate to version 2.2.1 or later.", "published": "2020-09-01T15:30:58", "modified": "2021-09-23T21:32:17", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}, "cvss2": {"cvssV2": {"version": "2.0", "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "accessVector": "NETWORK", "accessComplexity": "MEDIUM", "authentication": "NONE", "confidentialityImpact": "NONE", "integrityImpact": "PARTIAL", "availabilityImpact": "NONE", "baseScore": 4.3}, "severity": "MEDIUM", "exploitabilityScore": 8.6, "impactScore": 2.9, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": true}, "cvss3": {"cvssV3": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE", "baseScore": 6.1, "baseSeverity": "MEDIUM"}, "exploitabilityScore": 2.8, "impactScore": 2.7}, "href": "https://github.com/advisories/GHSA-p239-93f7-h6xf", "reporter": "GitHub Advisory Database", "references": ["https://github.com/swagger-api/swagger-ui/issues/1865", "https://www.npmjs.com/advisories/126", "https://nvd.nist.gov/vuln/detail/CVE-2016-5682", "https://community.rapid7.com/community/infosec/blog/2016/09/02/r7-2016-19-persistent-xss-via-unescaped-parameters-in-swagger-ui", "https://github.com/advisories/GHSA-p239-93f7-h6xf"], "cvelist": ["CVE-2016-5682"], "immutableFields": [], "lastseen": "2022-04-30T13:47:21", "viewCount": 8, "enchantments": {"dependencies": {"references": [{"type": "cve", "idList": ["CVE-2016-5682"]}, {"type": "nodejs", "idList": ["NODEJS:126"]}, {"type": "redhatcve", "idList": ["RH:CVE-2016-5682"]}]}, "score": {"value": 5.5, "vector": "NONE"}, "backreferences": {"references": [{"type": "cve", "idList": ["CVE-2016-5682"]}, {"type": "kitploit", "idList": ["KITPLOIT:116690769744039319"]}, {"type": "redhatcve", "idList": ["RH:CVE-2016-5682"]}]}, "exploitation": null, "vulnersScore": 5.5}, "_state": {"dependencies": 0, "score": 0}, "_internal": {}, "affectedSoftware": [{"version": "2.2.0", "operator": "le", "ecosystem": "NPM", "name": "swagger-ui"}]}
{"redhatcve": [{"lastseen": "2022-01-12T02:54:10", "description": "Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.\n", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "NETWORK", "availabilityImpact": "NONE", "integrityImpact": "LOW", "baseScore": 6.1, "privilegesRequired": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "userInteraction": "REQUIRED", "version": "3.1"}, "impactScore": 2.7}, "published": "2017-04-19T13:18:19", "type": "redhatcve", "title": "CVE-2016-5682", "bulletinFamily": "info", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "NONE", "availabilityImpact": "NONE", "integrityImpact": "PARTIAL", "baseScore": 4.3, "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 2.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2016-5682"], "modified": "2022-01-11T16:10:46", "id": "RH:CVE-2016-5682", "href": "https://access.redhat.com/security/cve/cve-2016-5682", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}}], "nodejs": [{"lastseen": "2021-09-23T06:36:00", "description": "## Overview\n\nAffected versions of `swagger-ui` contain a cross-site scripting vulnerability in the key names of a specific nested object in the JSON document.\n\n\n## Proof of Concept\nThe vulnerable object structure is:\n```\n{\n \"definitions\": {\n \"arbitraryVal\": {\n \"properties\": {\n \"<INJECTABLE_KEY_NAME>\": \"LoremIpsum\"\n }\n }\n }\n}\n```\nMalicious JSON documents can be loaded in by providing a URL to them in the `url` query string parameter.\n\n\n## Recommendation\n\nUpdate to version 2.2.1 or later.\n\n\n\n## References\n\n- [Issue #1865](https://github.com/swagger-api/swagger-ui/issues/1865)\n- [GitHub Advisory](https://github.com/advisories/GHSA-p239-93f7-h6xf)", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "NETWORK", "availabilityImpact": "NONE", "integrityImpact": "LOW", "baseScore": 6.1, "privilegesRequired": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "userInteraction": "REQUIRED", "version": "3.1"}, "impactScore": 2.7}, "published": "2016-07-21T17:01:35", "type": "nodejs", "title": "Cross-Site Scripting", "bulletinFamily": "software", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "NONE", "availabilityImpact": "NONE", "integrityImpact": "PARTIAL", "baseScore": 4.3, "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 2.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2016-5682"], "modified": "2021-09-23T07:57:24", "id": "NODEJS:126", "href": "https://www.npmjs.com/advisories/126", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}}], "osv": [{"lastseen": "2022-05-11T21:40:19", "description": "Affected versions of `swagger-ui` contain a cross-site scripting vulnerability in the key names of a specific nested object in the JSON document.\n\n\n## Proof of Concept\nThe vulnerable object structure is:\n```\n{\n \"definitions\": {\n \"arbitraryVal\": {\n \"properties\": {\n \"<INJECTABLE_KEY_NAME>\": \"LoremIpsum\"\n }\n }\n }\n}\n```\nMalicious JSON documents can be loaded in by providing a URL to them in the `url` query string parameter.\n\n\n\n## Recommendation\n\nUpdate to version 2.2.1 or later.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "NETWORK", "availabilityImpact": "NONE", "integrityImpact": "LOW", "privilegesRequired": "NONE", "baseScore": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "version": "3.1", "userInteraction": "REQUIRED"}, "impactScore": 2.7}, "published": "2020-09-01T15:30:58", "type": "osv", "title": "Cross-Site Scripting in swagger-ui", "bulletinFamily": "software", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "NONE", "availabilityImpact": "NONE", "integrityImpact": "PARTIAL", "baseScore": 4.3, "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 2.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2016-5682"], "modified": "2021-09-23T21:32:17", "id": "OSV:GHSA-P239-93F7-H6XF", "href": "https://osv.dev/vulnerability/GHSA-p239-93f7-h6xf", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}}], "cve": [{"lastseen": "2022-03-23T14:39:41", "description": "Swagger-UI before 2.2.1 has XSS via the Default field in the Definitions section.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "NETWORK", "availabilityImpact": "NONE", "integrityImpact": "LOW", "privilegesRequired": "NONE", "baseScore": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "version": "3.1", "userInteraction": "REQUIRED"}, "impactScore": 2.7}, "published": "2017-04-10T03:59:00", "type": "cve", "title": "CVE-2016-5682", "cwe": ["CWE-79"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "NONE", "availabilityImpact": "NONE", "integrityImpact": "PARTIAL", "baseScore": 4.3, "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 2.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2016-5682"], "modified": "2020-05-07T20:06:00", "cpe": [], "id": "CVE-2016-5682", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-5682", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}, "cpe23": []}]}