原始 OSV JSON
{
"id": "GHSA-xc6g-ggrc-qq4r",
"aliases": [
"CVE-2017-16016"
],
"details": "Affected versions of `sanitize-html` are vulnerable to cross-site scripting when allowedTags includes at least one `nonTextTag`.\n\n## Proof of Concept\n\n```js\nvar sanitizeHtml = require('sanitize-html');\n\nvar dirty = '!<textarea></textarea><svg/onload=prompt`xs`></textarea>!';\nvar clean = sanitizeHtml(dirty, {\n allowedTags: [ 'textarea' ]\n});\n\nconsole.log(clean);\n\n// !<textarea></textarea><svg/onload=prompt`xs`></textarea>!\n```\n\n\n## Recommendation\n\nUpdate to version 1.11.4 or later.",
"summary": "Cross-Site Scripting in sanitize-html",
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.11.4"
}
]
}
],
"package": {
"name": "sanitize-html",
"ecosystem": "npm"
},
"database_specific": {
"last_known_affected_version_range": "<= 1.11.1"
}
}
],
"modified": "2023-09-08T23:04:54Z",
"severity": [],
"published": "2018-11-09T17:47:23Z",
"references": [
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16016",
"type": "ADVISORY"
},
{
"url": "https://github.com/punkave/sanitize-html/issues/100",
"type": "WEB"
},
{
"url": "https://github.com/punkave/sanitize-html/commit/5d205a1005ba0df80e21d8c64a15bb3accdb2403",
"type": "WEB"
},
{
"url": "https://github.com/punkave/sanitize-html/commit/5d205a1005ba0df80e21d8c64a15bb3accdb2403)))",
"type": "WEB"
},
{
"url": "https://github.com/advisories/GHSA-xc6g-ggrc-qq4r",
"type": "ADVISORY"
},
{
"url": "https://npmjs.com/package/sanitize-html#discarding-the-entire-contents-of-a-disallowed-tag",
"type": "WEB"
},
{
"url": "https://www.npmjs.com/advisories/154",
"type": "WEB"
}
],
"schema_version": "1.4.0",
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2020-06-16T22:02:52Z"
}
}