Skip to content

Sanitize-html Vulnerable To REDoS Attacks

High severity GitHub Reviewed Published Aug 31, 2022 to the GitHub Advisory Database • Updated Apr 22, 2024

Package

npm sanitize-html (npm)

Affected versions

< 2.7.1

Patched versions

2.7.1

Description

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.

References

Published by the National Vulnerability Database Aug 30, 2022
Published to the GitHub Advisory Database Aug 31, 2022
Last updated Apr 22, 2024
Reviewed Apr 22, 2024

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses

CVE ID

CVE-2022-25887

GHSA ID

GHSA-cgfm-xwp7-2cvr

Source code

No known source code
Checking history
See something to contribute? Suggest improvements for this vulnerability.