Description
@rkesters/gnuplot is an easy to use node module to draw charts using gnuplot and ps2pdf. The trim-newlines package before 3.0.1 and 4.x before 4.0.1 for Node.js has an issue related to regular expression denial-of-service (ReDoS) for the .end() method.
Recommendation
Update the trim-newlines package to the latest compatible version. Followings are version details:
Affected version(s): **= 4.0.0 < 3.0.1** Patched version(s): **4.0.1 3.0.1**
References
Could your website be exposed too?
SmartScanner can check your website for Uncontrolled Resource Consumption in trim-newlines and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Uncontrolled Resource Consumption in trim-off-newlines - CVE-2021-23425
- Uncontrolled Resource Consumption in transpile - CVE-2021-23429
- Uncontrolled Resource Consumption in ansi-html - CVE-2021-23424
- DesktopCommanderMCP is vulnerable to Uncontrolled Resource Consumption - CVE-2026-10691


