Every CVE Search/ Get API key

CVE-2017-16016

Cross-Site Scripting in sanitize-html

6.1 MediumFix available

CVE-2017-16016 is a medium vulnerability (CVSS 6.1) in Punkave Sanitize-html, published June 4, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.34%, the 71st percentile. Fixed in sanitize-html 1.11.4.

Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at least one nonTextTags, the result is a potential XSS vulnerability.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

1.34%Up 0.5 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 6.1

Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at least one nonTextTags, the result is a potential XSS vulnerability.

Record
CVE-2017-16016
CVSS 3.0
6.1 MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:P/A:N
Weakness
CWE-79
Updated
2026-11-02
CVE List No score

Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at least one nonTextTags, the result is a potential XSS vulnerability.

Record
CVE-2017-16016
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2018-0787 No score

Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at least one nonTextTags, the result is a potential XSS vulnerability.

Record
EUVD-2018-0787
Updated
2026-11-03
GitHub AdvisoriesGHSA-xc6g-ggrc-qq4r No score

Cross-Site Scripting in sanitize-html

Affected versions of sanitize-html are vulnerable to cross-site scripting when allowedTags includes at least one nonTextTag.

Proof of Concept

var sanitizeHtml = require('sanitize-html');

var dirty = '!<textarea>&lt;/textarea&gt;<svg/onload=prompt`xs`&gt;</textarea>!';
var clean = sanitizeHtml(dirty, {
    allowedTags: [ 'textarea' ]
});

console.log(clean);

// !<textarea></textarea><svg/onload=prompt`xs`></textarea>!

Recommendation

Update to version 1.11.4 or later.

Record
GHSA-xc6g-ggrc-qq4r
Weakness
CWE-79
Updated
2026-11-02
OSV 6.1

Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at least one nonTextTags, the result is a potential XSS vulnerability.

Record
CVE-2017-16016
CVSS 3.0
6.1 MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-xc6g-ggrc-qq4r No score

Cross-Site Scripting in sanitize-html

Affected versions of sanitize-html are vulnerable to cross-site scripting when allowedTags includes at least one nonTextTag.

Proof of Concept

var sanitizeHtml = require('sanitize-html');

var dirty = '!<textarea>&lt;/textarea&gt;<svg/onload=prompt`xs`&gt;</textarea>!';
var clean = sanitizeHtml(dirty, {
    allowedTags: [ 'textarea' ]
});

console.log(clean);

// !<textarea></textarea><svg/onload=prompt`xs`></textarea>!

Recommendation

Update to version 1.11.4 or later.

Record
GHSA-xc6g-ggrc-qq4r
Weakness
CWE-79
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2017-16016 No score

CVE-2017-16016 in @rootio/sanitize-html - Patched by Root

Root has patched CVE-2017-16016 in the @rootio/sanitize-html package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2017-16016
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
sanitize-html
npm
through 1.11.1
1.11.4
sanitize-html
npm
before 1.11.4
1.11.4
@rootio/sanitize-html
Root:npm
before 1.4.2-root.io.5
1.4.2-root.io.51.4.2-root.io.61.4.2-root.io.71.4.2-root.io.81.4.2-root.io.9
sanitize-html
Root:npm
before 1.4.2-aikido.9
1.4.2-aikido.9

History

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, GitHub Advisories, NVD, OSV

References

MoveEnter Open