Version in base suite: 3.0.0-1 Base version: node-trim-newlines_3.0.0-1 Target version: node-trim-newlines_3.0.0-1+deb11u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/n/node-trim-newlines/node-trim-newlines_3.0.0-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/n/node-trim-newlines/node-trim-newlines_3.0.0-1+deb11u1.dsc changelog | 7 +++++++ patches/CVE-2021-33623.patch | 34 ++++++++++++++++++++++++++++++++++ patches/series | 1 + 3 files changed, 42 insertions(+) diff -Nru node-trim-newlines-3.0.0/debian/changelog node-trim-newlines-3.0.0/debian/changelog --- node-trim-newlines-3.0.0/debian/changelog 2021-01-04 05:20:52.000000000 +0000 +++ node-trim-newlines-3.0.0/debian/changelog 2022-02-05 11:23:20.000000000 +0000 @@ -1,3 +1,10 @@ +node-trim-newlines (3.0.0-1+deb11u1) bullseye; urgency=medium + + * Team upload + * Fix Regex Denial of Service (Closes: CVE-2021-33623) + + -- Yadd Sat, 05 Feb 2022 12:23:20 +0100 + node-trim-newlines (3.0.0-1) unstable; urgency=medium * Team upload diff -Nru node-trim-newlines-3.0.0/debian/patches/CVE-2021-33623.patch node-trim-newlines-3.0.0/debian/patches/CVE-2021-33623.patch --- node-trim-newlines-3.0.0/debian/patches/CVE-2021-33623.patch 1970-01-01 00:00:00.000000000 +0000 +++ node-trim-newlines-3.0.0/debian/patches/CVE-2021-33623.patch 2022-02-05 11:21:44.000000000 +0000 @@ -0,0 +1,34 @@ +Description: fix ReDoS +Author: upstream +Bug: https://github.com/advisories/GHSA-7p7h-4mm5-852v +Forwarded: not-needed +Reviewed-By: Yadd +Last-Update: 2022-02-05 + +--- a/index.js ++++ b/index.js +@@ -1,4 +1,13 @@ + 'use strict'; + module.exports = string => string.replace(/^[\r\n]+/, '').replace(/[\r\n]+$/, ''); + module.exports.start = string => string.replace(/^[\r\n]+/, ''); +-module.exports.end = string => string.replace(/[\r\n]+$/, ''); ++ ++module.exports.end = string => { ++ let end = string.length; ++ ++ while (end > 0 && (string[end - 1] === '\r' || string[end - 1] === '\n')) { ++ end--; ++ } ++ ++ return end < string.length ? string.slice(0, end) : string; ++}; +--- a/package.json ++++ b/package.json +@@ -1,6 +1,6 @@ + { + "name": "trim-newlines", +- "version": "3.0.0", ++ "version": "3.0.1", + "description": "Trim newlines from the start and/or end of a string", + "license": "MIT", + "repository": "sindresorhus/trim-newlines", diff -Nru node-trim-newlines-3.0.0/debian/patches/series node-trim-newlines-3.0.0/debian/patches/series --- node-trim-newlines-3.0.0/debian/patches/series 2021-01-04 05:18:17.000000000 +0000 +++ node-trim-newlines-3.0.0/debian/patches/series 2022-02-05 11:22:08.000000000 +0000 @@ -1 +1,2 @@ replace-ava-by-tape.patch +CVE-2021-33623.patch