Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2021-33623: trim-newlines

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.

CVE
#dos#nodejs#js

4.0.2 • Public • Published 2 years ago

  • Readme
  • Code Beta
  • 0 Dependencies
  • 312 Dependents
  • 7 Versions

trim-newlines

Trim newlines from the start and/or end of a string

Install

$ npm install trim-newlines

Usage

import trimNewlines from 'trim-newlines’;

trimNewlines(‘\n🦄\r\n’); //=> ‘🦄’

trimNewlines.start(‘\n🦄\r\n’); //=> ‘🦄\r\n’

trimNewlines.end(‘\n🦄\r\n’); //=> ‘\n🦄’

API****trimNewlines(string)

Trim from the start and end of a string.

trimNewlines.start(string)

Trim from the start of a string.

trimNewlines.end(string)

Trim from the end of a string.

Related

  • trim-left - Similar to String#trim() but removes only whitespace on the left
  • trim-right - Similar to String#trim() but removes only whitespace on the right.

Keywords

  • trim
  • newline
  • newlines
  • linebreak
  • lf
  • crlf
  • left
  • right
  • start
  • end
  • string
  • remove
  • delete
  • strip

Related news

Ubuntu Security Notice USN-5999-1

Ubuntu Security Notice 5999-1 - It was discovered that trim-newlines incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907