Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools

sanitize-html

Source -

NVDADPCNA

CNA CVEs -

5

ADP CVEs -

1

CISA CVEs -

0

NVD CVEs -

10
Related CVEsRelated VendorsRelated AssignersReports
12Vulnerabilities found

CVE-2026-53606
Assigner-GitHub, Inc.
ShareView Details
Assigner-GitHub, Inc.
CVSS Score-5.4||MEDIUM
EPSS-0.14% / 3.43%
||
7 Day CHG~0.00%
Published-12 Jun, 2026 | 20:50
Updated-15 Jun, 2026 | 20:54
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
sanitize-html has an incomplete URI scheme validation that allows javascript: URIs through action, formaction, data, poster, and background attributes

ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. Versions of sanitize-html prior to 2.17.5 use `allowedSchemesAppliedToAttributes` (default: `['href', 'src', 'cite']`) to gate the `naughtyHref()` function that blocks dangerous URI schemes like `javascript:` and `vbscript:`. The HTML specification defines 10+ attributes that accept URIs (`action`, `formaction`, `data`, `poster`, `background`, `ping`, `xlink:href`, `dynsrc`, `lowsrc`), but none of these are included in the default gate list. When a developer allows any of these attributes in their configuration, `javascript:` URIs pass through completely unmodified, enabling XSS. Version 2.17.5 patches the issue.

Action-Not Available
Vendor-apostrophecms
Product-sanitize-html
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2026-44990
Assigner-GitHub, Inc.
ShareView Details
Assigner-GitHub, Inc.
CVSS Score-9.3||CRITICAL
EPSS-0.51% / 40.68%
||
7 Day CHG+0.04%
Published-12 Jun, 2026 | 20:39
Updated-23 Jul, 2026 | 12:18
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html`

ApostropheCMS is an open-source Node.js content management system, and sanitize-html provides a simple HTML sanitizer with a clear API. Under the default configuration, versions of `sanitize-html` prior to 2.17.4 can turn attacker-controlled content inside a disallowed `xmp` element into live HTML or JavaScript. This is a sanitizer bypass in the default `disallowedTagsMode: 'discard'` path and can lead to stored XSS in applications that render sanitized output back to users. Version 2.17.4 patches the issue.

Action-Not Available
Vendor-apostrophecmsRed Hat, Inc.
Product-sanitize-htmlRed Hat OpenShift Container Platform 4Red Hat Advanced Cluster Management for Kubernetes 2.11Red Hat OpenShift Dev SpacesRed Hat Quay 3.15Red Hat OpenShift Virtualization 4Red Hat Quay 3.12Red Hat Quay 3.16Red Hat Satellite 6Red Hat Quay 3.1multicluster engine for Kubernetes 2.6Red Hat Hardened ImagesRed Hat OpenShift AI (RHOAI)Red Hat Quay 3.9Red Hat Advanced Cluster Management for Kubernetes 2.14multicluster engine for Kubernetes 2.9
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2026-40186
Assigner-GitHub, Inc.
ShareView Details
Assigner-GitHub, Inc.
CVSS Score-6.1||MEDIUM
EPSS-0.24% / 14.51%
||
7 Day CHG~0.00%
Published-15 Apr, 2026 | 20:15
Updated-25 Apr, 2026 | 18:15
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements

ApostropheCMS is an open-source Node.js content management system. A regression introduced in commit 49d0bb7, included in versions 2.17.1 of the ApostropheCMS-maintained sanitize-html package bypasses allowedTags enforcement for text inside nonTextTagsArray elements (textarea and option). ApostropheCMS version 4.28.0 is affected through its dependency on the vulnerable sanitize-html version. The code at packages/sanitize-html/index.js:569-573 incorrectly assumes that htmlparser2 does not decode entities inside these elements and skips escaping, but htmlparser2 10.x does decode entities before passing text to the ontext callback. As a result, entity-encoded HTML is decoded by the parser and then written directly to the output as literal HTML characters, completely bypassing the allowedTags filter. An attacker can inject arbitrary tags including XSS payloads through any allowed option or textarea element using entity encoding. This affects non-default configurations where option or textarea are included in allowedTags, which is common in form builders and CMS platforms. This issue has been fixed in version 2.17.2 of sanitize-html and 4.29.0 of ApostropheCMS.

Action-Not Available
Vendor-apostrophecmsapostrophecms
Product-sanitize-htmlapostrophecmssanitize-htmlapostrophe
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2014-125128
Assigner-Checkmarx
ShareView Details
Assigner-Checkmarx
CVSS Score-6.1||MEDIUM
EPSS-0.26% / 17.13%
||
7 Day CHG~0.00%
Published-08 Sep, 2025 | 10:09
Updated-19 Sep, 2025 | 15:14
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

'sanitize-html' prior to version 1.0.3 is vulnerable to Cross-site Scripting (XSS). The function 'naughtyHref' doesn't properly validate the hyperreference (`href`) attribute in anchor tags (`<a>`), allowing bypasses that contain different casings, whitespace characters, or hexadecimal encodings.

Action-Not Available
Vendor-apostrophecms
Product-sanitize-html
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2019-25225
Assigner-Checkmarx
ShareView Details
Assigner-Checkmarx
CVSS Score-6.1||MEDIUM
EPSS-0.25% / 16.53%
||
7 Day CHG~0.00%
Published-08 Sep, 2025 | 10:02
Updated-19 Sep, 2025 | 15:18
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). The `sanitizeHtml()` function in `index.js` does not sanitize content when using the custom `transformTags` option, which is intended to convert attribute values into text. As a result, malicious input can be transformed into executable code.

Action-Not Available
Vendor-apostrophecms
Product-sanitize-html
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2024-21501
Assigner-Snyk
ShareView Details
Assigner-Snyk
CVSS Score-5.3||MEDIUM
EPSS-1.02% / 59.74%
||
7 Day CHG~0.00%
Published-24 Feb, 2024 | 05:00
Updated-25 Apr, 2025 | 19:37
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and with the style attribute allowed, allowing enumeration of files in the system (including project dependencies). An attacker could exploit this vulnerability to gather details about the file system structure and dependencies of the targeted server.

Action-Not Available
Vendor-apostrophecmsn/aapostrophecmsFedora Project
Product-sanitize-htmlfedorasanitize-htmlorg.webjars.npm:sanitize-htmlsanitize-html
CWE ID-CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
CWE ID-CWE-538
Insertion of Sensitive Information into Externally-Accessible File or Directory
CVE-2022-25887
Assigner-Snyk
ShareView Details
Assigner-Snyk
CVSS Score-5.3||MEDIUM
EPSS-1.15% / 63.55%
||
7 Day CHG~0.00%
Published-30 Aug, 2022 | 05:00
Updated-17 Sep, 2024 | 03:07
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
Regular Expression Denial of Service (ReDoS)

The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.

Action-Not Available
Vendor-apostrophecmsn/a
Product-sanitize-htmlsanitize-html
CWE ID-CWE-1333
Inefficient Regular Expression Complexity
CVE-2021-26540
Assigner-MITRE Corporation
ShareView Details
Assigner-MITRE Corporation
CVSS Score-5.3||MEDIUM
EPSS-1.75% / 75.56%
||
7 Day CHG~0.00%
Published-08 Feb, 2021 | 16:16
Updated-03 Aug, 2024 | 20:26
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHostnames" option when the "allowIframeRelativeUrls" is set to true, which allows attackers to bypass hostname whitelist for iframe element, related using an src value that starts with "/\\example.com".

Action-Not Available
Vendor-apostrophecmsn/a
Product-sanitize-htmln/a
CVE-2021-26539
Assigner-MITRE Corporation
ShareView Details
Assigner-MITRE Corporation
CVSS Score-5.3||MEDIUM
EPSS-1.95% / 78.15%
||
7 Day CHG~0.00%
Published-08 Feb, 2021 | 16:16
Updated-03 Aug, 2024 | 20:26
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

Apostrophe Technologies sanitize-html before 2.3.1 does not properly handle internationalized domain name (IDN) which could allow an attacker to bypass hostname whitelist validation set by the "allowedIframeHostnames" option.

Action-Not Available
Vendor-apostrophecmsn/a
Product-sanitize-htmln/a
CVE-2016-1000237
Assigner-MITRE Corporation
ShareView Details
Assigner-MITRE Corporation
CVSS Score-6.1||MEDIUM
EPSS-0.84% / 54.05%
||
7 Day CHG~0.00%
Published-23 Jan, 2020 | 14:21
Updated-06 Aug, 2024 | 03:55
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

sanitize-html before 1.4.3 has XSS.

Action-Not Available
Vendor-apostrophecmsn/a
Product-sanitize-htmln/a
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2017-16017
Assigner-HackerOne
ShareView Details
Assigner-HackerOne
CVSS Score-6.1||MEDIUM
EPSS-1.19% / 64.54%
||
7 Day CHG~0.00%
Published-04 Jun, 2018 | 19:00
Updated-17 Sep, 2024 | 01:40
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

sanitize-html is a library for scrubbing html input for malicious values Versions 1.2.2 and below have a cross site scripting vulnerability.

Action-Not Available
Vendor-punkaveHackerOne
Product-sanitize-htmlsanitize-html node module
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2017-16016
Assigner-HackerOne
ShareView Details
Assigner-HackerOne
CVSS Score-6.1||MEDIUM
EPSS-1.36% / 68.76%
||
7 Day CHG~0.00%
Published-04 Jun, 2018 | 19:00
Updated-17 Sep, 2024 | 01:46
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

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.

Action-Not Available
Vendor-punkaveHackerOne
Product-sanitize-htmlsanitize-html node module
CWE ID-CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')