Appsecure logo

CVE-2022-37620: High Vulnerability in kangax html-minifier

A high-severity Regular Expression Denial of Service (ReDoS) vulnerability exists in kangax html-minifier. This flaw can allow attackers to disrupt service availability. Immediate patching is necessary to mitigate risks.

HIGHCVSS 7.5 · Published October 31, 2022

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

A Regular Expression Denial of Service (ReDoS) flaw was found in kangax html-minifier 4.0.0 because of the reCustomIgnore regular expression. This vulnerability, classified with a CVSS score of 7.5, is considered high severity due to its potential impact on service availability.

The vulnerability can be exploited over a network, requiring no privileges or user interaction, making it accessible for remote attackers. Organizations using affected versions should be particularly vigilant, as the flaw could lead to significant service disruptions.

Risk to organizations includes potential downtime and resource exhaustion, which can impact operations and customer satisfaction. Given the availability impact is rated as high, organizations should prioritize patching immediately.

Currently, there are no known exploits or public proof-of-concept available, but the nature of the vulnerability warrants swift action to prevent any future incidents. Organizations must ensure they are running the latest patched versions.

Vulnerability Details

The identified vulnerability allows attackers to trigger significant performance issues through crafted input targeting the vulnerable regular expression. The affected products include both the html-minifier and html-minifier-terser libraries, with specific versions being 4.0.0 and below for kangax's html-minifier and 7.2.0 and below for terser's html-minifier-terser.

The vulnerability was published on October 31, 2022, and belongs to the CWE-1333 category, indicating regular expression denial of service issues. Organizations should note that the flaw remains classified under the 'Modified' status, indicating ongoing discussions or updates regarding its impact.

Technical Analysis

The root cause of this vulnerability lies in the regular expression used in the html-minifier's processing logic, specifically the reCustomIgnore expression. Attackers may leverage this flaw by sending specially crafted payloads that exploit the inefficiencies of the regex, leading to excessive resource consumption.

This vulnerability has a low attack complexity, requiring no special conditions to exploit, making it highly accessible for attackers. There are no privileges required to exploit this vulnerability, as it can be executed without user interaction.

The confidentiality impact is rated as none, indicating that the vulnerability does not expose sensitive data. However, the integrity impact is also none, meaning that it does not alter data. The availability impact is rated as high, reflecting the potential for service disruption.

Risk & Impact Analysis

Organizations utilizing the affected versions of html-minifier should assess their exposure to potential denial of service attacks. This vulnerability poses a significant risk, particularly for web applications where the library is employed to minify HTML content.

The blast radius could be extensive, impacting any service that relies on the vulnerable library for processing HTML. Given the high severity, organizations should address this vulnerability in their priority patch cycle to mitigate immediate risks.

Based on the CVSS score and the EPSS 0.00482 indicating a 0.65 percentile, the urgency for remediation is high. Immediate action is recommended to prevent potential exploitation.

Exploitation Status

Signal

Status

Known Exploit

No

Public PoC

No

Actively Exploited

No

Ransomware Use

No

Affected Versions

The vulnerability affects kangax's html-minifier version 4.0.0 and terser's html-minifier-terser versions up to 7.2.0. Organizations should ensure they upgrade to patched versions to mitigate the risk associated with this vulnerability.

Mitigation & Remediation

Organizations should review their use of the affected libraries and apply patches immediately. For those unable to update, alternative workarounds must be implemented to prevent exploitation.

Configuration hardening and implementing strict input validation can also help mitigate risks. For further guidance, organizations can refer to resources on penetration testing to assess potential vulnerabilities.

Detection Guidance

To detect potential exploitation of this vulnerability, organizations should monitor logs for indicators of abnormal service behavior. Behavioral anomalies, such as unexpected latency or service interruptions, should be flagged for investigation.

Additionally, network signatures related to denial of service attacks may be useful in identifying attempts to exploit this vulnerability. Regular reviews of system changes can also provide insight into potential exploitation attempts.

AppSecure Threat Intelligence Insight

The long-term significance of CVE-2022-37620 highlights the importance of thorough testing in software development, particularly with libraries that handle untrusted input. This vulnerability serves as a reminder of the potential risks associated with regular expressions in software applications.

Security teams should recognize the patterns of vulnerabilities that emerge from inadequate input validation and regex usage. By learning from this incident, organizations can strengthen their software security practices and minimize future risks.

For further insights on effective security strategies and practices, refer to the following resources: vulnerability management program, penetration testing methodology, and API penetration testing best practices.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.