sanitize-html
At a glance
- Source
- NVD
- EPSS
- EPSS 0.27 % Β· percentile 19 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- Checkmarx
- NVD status
- Analyzed
Description
`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.
Weaknesses (CWE)
- CWE-79 β Improper Neutralization of Input During Web Page Generation
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | Checkmarx |
| CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | NVD Β· 596c5446-0ce5-4ba2-aa66-48b3b757a647 (Secondary) |
Advisories
- GHSA-qhxp-v273-g94h β sanitize-html is vulnerable to XSS through incomprehensive sanitization
European references
- ENISA EUVD Β· EUVD-2019-19375
- GCVE Β· GCVE-0-2019-25225
Affected configurations (NVD CPE)
cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*< 2.0.0
Affected products
| Product | Versions |
|---|---|
| sanitize-html | affected 0 < 2.0.0-beta |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST β attribution requested |
| ENISA EUVD | ENISA β reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain β this product uses data from the NVD API but is not endorsed or certified by the NVD |