CVE-2021-33623
JavaScript vulnerability analysis and mitigation

Overview

The trim-newlines package before 3.0.1 and 4.x before 4.0.1 for Node.js contains a vulnerability related to regular expression denial-of-service (ReDoS) in the .end() method. The vulnerability was discovered and disclosed on May 28, 2021, affecting the popular JavaScript module used to strip newlines from the start and/or end of a string (CVE Mitre).

Technical details

The vulnerability is classified as a Regular Expression Denial of Service (ReDoS) attack that exploits the way regular expression implementations can reach extreme situations causing them to work very slowly in a way that is exponentially related to the input size. The vulnerability has been assigned a CVSS score of 7.5 (HIGH) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NetApp Advisory).

Impact

When successfully exploited, this vulnerability could lead to a Denial of Service (DoS) condition. An attacker can cause a program using node-trim-newlines to enter extreme situations where the regex processing hangs for a very long time, effectively making the service unavailable (Debian Advisory).

Mitigation and workarounds

The vulnerability has been fixed in trim-newlines versions 3.0.1 and 4.0.1. Users are recommended to upgrade to these or later versions to address the security issue. The fix was implemented through commits that address the ReDoS vulnerability in the .end() method (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management