CVE-2022-25887 | 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.

Published: 2022-08-30 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-25887 is rated Moderate Risk (43.7/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 1.11%). Core evidence: EPSS rose +1.01% over the last day, indicating growing attacker interest. Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-25887

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.10% 1.11% +1.01%
2 2026-06-06 0.42% 0.10% -0.33%
3 2026-02-08 0.42%

Full EPSS history (13 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-25887

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 1.4 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2022-25887

GitHub Security Advisory for CVE-2022-25887

GHSA-cgfm-xwp7-2cvr · Severity: high · Ecosystem: npm — Sanitize-html Vulnerable To REDoS Attacks

OS Trackers for CVE-2022-25887

vendor priority summary link
debian not yet assigned CVE-2022-25887 not yet assigned priority: Debian including 1 source packages (node-sanitize-html), 4 status rows across 4 suites (bookworm, forky, sid, trixie): resolved 4. https://security-tracker.debian.org/tracker/CVE-2022-25887
redhat low https://access.redhat.com/security/cve/CVE-2022-25887
ubuntu medium CVE-2022-25887 medium priority: Ubuntu including 2 source packages (jupyter-notebook, node-sanitize-html), 26 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 8, DNE 6, released 5, needs-triage 4, not-affected 2, needed 1. https://ubuntu.com/security/CVE-2022-25887

Affected software / configurations for CVE-2022-25887

Vendor Product Version Raw CPE
apostrophecms sanitize-html < 2.7.1 cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*

References for CVE-2022-25887

cvelogic Threat Intelligence