Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

GHSA-7p7h-4mm5-852v

HIGHFix: sindresorhus/trim-newlines@25246c6

GHSA-7p7h-4mm5-852v is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in trim-newlines. O3 Security confirms whether GHSA-7p7h-4mm5-852v is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Uncontrolled Resource Consumption in trim-newlines

Also known asCVE-2021-33623
Published
Jun 7, 2021
Updated
Jul 8, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Jul 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

578other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
trim-newlinesnpm
19.5Mdownloads / week

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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmtrim-newlinesall versions3.0.1
📦npmtrim-newlines4.0.0&&< 4.0.14.0.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for trim-newlines. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update trim-newlines to 3.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7p7h-4mm5-852v is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-7p7h-4mm5-852v is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-7p7h-4mm5-852v. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

OpenShift Container Platform (OCP) grafana-container does package a vulnerable verison of nodejs trim-newlines. However due to the instance being read only and behind OpenShift OAuth, the impact by this vulnerability is Low. Red Hat Advanced Cluster Management for Kubernetes (ACM) containers affected by this flaw are…

Frequently Asked Questions

@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.
O3 Security · Impact-Aware SCA

Is GHSA-7p7h-4mm5-852v in your dependencies?

O3 detects GHSA-7p7h-4mm5-852v across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.