Uncontrolled Resource Consumption in trim-newlines
@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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | trim-newlines | < 3.0.1, >= 4.0.0, < 4.0.1 | 3.0.1, 4.0.1 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-33623
- https://github.com/sindresorhus/trim-newlines/commit/25246c6ce5eea1c82d448998733a6302a4350d91
- https://github.com/sindresorhus/trim-newlines/commit/b10d5f4afef832b16bc56d49fc52c68cbd403869
- https://github.com/sindresorhus/trim-newlines
- https://github.com/sindresorhus/trim-newlines/releases/tag/v4.0.1
- https://lists.debian.org/debian-lts-announce/2022/12/msg00033.html
- https://security.netapp.com/advisory/ntap-20210702-0007
- https://www.npmjs.com/package/trim-newlines
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-400- Platform
- npm
- Package
trim-newlines- Disclosed
- 07.06.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-7p7h-4mm5-852v - CC BY 4.0
Vulnerability history: trim-newlines
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.