Your message dated Sat, 09 Jul 2022 11:47:43 +0100 with message-id <2280fe8c78e64b02a6c1d04c6dde5a32e342ba81.camel@adam-barratt.org.uk> and subject line Closing requests for updates included in 11.4 has caused the Debian Bug report #1008045, regarding bullseye-pu: package node-mermaid/8.7.0+ds+~cs27.17.17-3+deb11u1 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 1008045: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008045 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: bullseye-pu: package node-mermaid/8.7.0+ds+~cs27.17.17-3+deb11u1
- From: Yadd <yadd@debian.org>
- Date: Mon, 21 Mar 2022 14:09:09 +0100
- Message-id: <164786814917.1590410.14372741310503659353.reportbug@debian007.xnr.fr>
Package: release.debian.org Severity: normal Tags: bullseye User: release.debian.org@packages.debian.org Usertags: pu [ Reason ] node-mermaid is vulnerable to XSS attack (CVE-2021-23648) [ Impact ] medium vulnerability [ Tests ] Test passed, new upstream test not applicable here [ Risks ] Low risk, patch is trivial [ Checklist ] [X] *all* changes are documented in the d/changelog [X] I reviewed all changes and I approve them [X] attach debdiff against the package in (old)stable [X] the issue is verified as fixed in unstable [ Changes ] Decode HTML entities before parsing URLs Cheers, Yadddiff --git a/debian/changelog b/debian/changelog index 3bfa0f2..32f71e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +node-mermaid (8.7.0+ds+~cs27.17.17-3+deb11u1) bullseye; urgency=medium + + * Decode html entities before sanitizing (Closes: CVE-2021-23648) + + -- Yadd <yadd@debian.org> Mon, 21 Mar 2022 14:06:12 +0100 + node-mermaid (8.7.0+ds+~cs27.17.17-3) unstable; urgency=medium * Team upload diff --git a/debian/patches/CVE-2021-23648.patch b/debian/patches/CVE-2021-23648.patch new file mode 100644 index 0000000..3571ee3 --- /dev/null +++ b/debian/patches/CVE-2021-23648.patch @@ -0,0 +1,46 @@ +Description: decode html entities before sanitizing (fixes XSS) +Author: Blade Barringer <blade.barringer@paypal.com> +Origin: upstream, https://github.com/braintree/sanitize-url/commit/8f7371ce +Bug: https://github.com/braintree/sanitize-url/pull/40 +Forwarded: not-needed +Reviewed-By: Yadd <yadd@debian.org> +Last-Update: 2022-03-21 + +--- a/sanitize-url/index.js ++++ b/sanitize-url/index.js +@@ -1,6 +1,7 @@ + 'use strict'; + + var invalidPrototcolRegex = /^(%20|\s)*(javascript|data)/im; ++const htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g; + var ctrlCharactersRegex = /[^\x20-\x7E]/gmi; + var urlSchemeRegex = /^([^:]+):/gm; + var relativeFirstCharacters = ['.', '/']; +@@ -9,15 +10,24 @@ + return relativeFirstCharacters.indexOf(url[0]) > -1; + } + ++// adapted from https://stackoverflow.com/a/29824550/2601552 ++function decodeHtmlCharacters(str) { ++ return str.replace(htmlEntitiesRegex, (match, dec) => { ++ return String.fromCharCode(dec); ++ }); ++} ++ + function sanitizeUrl(url) { + var urlScheme, urlSchemeParseResults, sanitizedUrl; + +- if (!url) { ++ sanitizedUrl = decodeHtmlCharacters(url || "") ++ .replace(ctrlCharactersRegex, "") ++ .trim(); ++ ++ if (!sanitizedUrl) { + return 'about:blank'; + } + +- sanitizedUrl = url.replace(ctrlCharactersRegex, '').trim(); +- + if (isRelativeUrlWithoutProtocol(sanitizedUrl)) { + return sanitizedUrl; + } diff --git a/debian/patches/series b/debian/patches/series index f41df00..b3ba76f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0002-Fix-unsupported-syntax.patch 0003-Replace-moment-mini-with-moment.patch CVE-2021-35513.patch +CVE-2021-23648.patch
--- End Message ---
--- Begin Message ---
- To: 1000355-done@bugs.debian.org, 1003261-done@bugs.debian.org, 1003713-done@bugs.debian.org, 1004459-done@bugs.debian.org, 1004580-done@bugs.debian.org, 1005129-done@bugs.debian.org, 1005135-done@bugs.debian.org, 1005231-done@bugs.debian.org, 1005237-done@bugs.debian.org, 1005252-done@bugs.debian.org, 1005256-done@bugs.debian.org, 1006316-done@bugs.debian.org, 1006504-done@bugs.debian.org, 1007714-done@bugs.debian.org, 1007762-done@bugs.debian.org, 1008045-done@bugs.debian.org, 1008153-done@bugs.debian.org, 1008161-done@bugs.debian.org, 1008162-done@bugs.debian.org, 1008166-done@bugs.debian.org, 1008168-done@bugs.debian.org, 1008268-done@bugs.debian.org, 1008577-done@bugs.debian.org, 1009077-done@bugs.debian.org, 1009250-done@bugs.debian.org, 1009345-done@bugs.debian.org, 1009363-done@bugs.debian.org, 1009726-done@bugs.debian.org, 1010037-done@bugs.debian.org, 1010050-done@bugs.debian.org, 1010058-done@bugs.debian.org, 1010194-done@bugs.debian.org, 1010211-done@bugs.debian.org, 1010304-done@bugs.debian.org, 1010383-done@bugs.debian.org, 1010439-done@bugs.debian.org, 1010613-done@bugs.debian.org, 1010857-done@bugs.debian.org, 1010924-done@bugs.debian.org, 1010963-done@bugs.debian.org, 1011022-done@bugs.debian.org, 1011198-done@bugs.debian.org, 1011271-done@bugs.debian.org, 1011287-done@bugs.debian.org, 1011331-done@bugs.debian.org, 1011359-done@bugs.debian.org, 1011365-done@bugs.debian.org, 1011426-done@bugs.debian.org, 1011746-done@bugs.debian.org, 1011939-done@bugs.debian.org, 1011942-done@bugs.debian.org, 1012033-done@bugs.debian.org, 1012047-done@bugs.debian.org, 1012140-done@bugs.debian.org, 1012322-done@bugs.debian.org, 1012323-done@bugs.debian.org, 1012331-done@bugs.debian.org, 1012553-done@bugs.debian.org, 1012585-done@bugs.debian.org, 1012723-done@bugs.debian.org, 1013237-done@bugs.debian.org, 1013306-done@bugs.debian.org, 1013418-done@bugs.debian.org, 1013755-done@bugs.debian.org, 1013879-done@bugs.debian.org, 1013880-done@bugs.debian.org, 1013944-done@bugs.debian.org, 1014014-done@bugs.debian.org, 1014054-done@bugs.debian.org, 1014079-done@bugs.debian.org, 1014199-done@bugs.debian.org, 1014206-done@bugs.debian.org, 1014221-done@bugs.debian.org
- Subject: Closing requests for updates included in 11.4
- From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
- Date: Sat, 09 Jul 2022 11:47:43 +0100
- Message-id: <2280fe8c78e64b02a6c1d04c6dde5a32e342ba81.camel@adam-barratt.org.uk>
Package: release.debian.org Version: 11.4 (re-sending with fixed bug numbers) Hi, The updates discussed in these bugs were included in today's bullseye point release. Regards, Adam
--- End Message ---