Your message dated Sat, 09 Jul 2022 11:47:43 +0100
with message-id
<2280fe8c78e64b02a6c1d04c6dde5a32e342ba81.ca...@adam-barratt.org.uk>
and subject line Closing requests for updates included in 11.4
has caused the Debian Bug report #1008162,
regarding bullseye-pu: package node-minimist/1.2.5+~cs5.3.1-2+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 [email protected]
immediately.)
--
1008162: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008162
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bullseye
User: [email protected]
Usertags: pu
[ Reason ]
node-minimist is vulnerable to a prototype pollution not totally fixed
by CVE-2020-7598 patch (pushed in 1.2.5-1 and 1.2.0-1+deb10u1)
[ Impact ]
Medium vulnerability
[ Tests ]
Test updated by upstream, passed
[ 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 ]
Better object check
Cheers,
Yadd
diff --git a/debian/changelog b/debian/changelog
index c2fbfe1..a2262fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+node-minimist (1.2.5+~cs5.3.1-2+deb11u1) bullseye; urgency=medium
+
+ * Team upload
+ * Fix prototype pollution (Closes: CVE-2021-44906)
+
+ -- Yadd <[email protected]> Wed, 23 Mar 2022 12:33:02 +0100
+
node-minimist (1.2.5+~cs5.3.1-2) unstable; urgency=medium
* Team upload
diff --git a/debian/patches/CVE-2021-44906.patch
b/debian/patches/CVE-2021-44906.patch
new file mode 100644
index 0000000..36bee5f
--- /dev/null
+++ b/debian/patches/CVE-2021-44906.patch
@@ -0,0 +1,59 @@
+Description: Fix for prototype pollution
+ The initial fix for prototype pollution (cf. SNYK-JS-MINIMIST-559764) in
+ setKey() was insufficient.
+Author: Yadd <[email protected]>
+Origin: upstream, https://github.com/substack/minimist/pull/165
+Bug: https://github.com/substack/minimist/issues/164
+Forwarded: not-needed
+Last-Update: 2022-03-23
+
+--- a/index.js
++++ b/index.js
+@@ -70,7 +70,7 @@
+ var o = obj;
+ for (var i = 0; i < keys.length-1; i++) {
+ var key = keys[i];
+- if (key === '__proto__') return;
++ if (isConstructorOrProto(o, key)) return;
+ if (o[key] === undefined) o[key] = {};
+ if (o[key] === Object.prototype || o[key] === Number.prototype
+ || o[key] === String.prototype) o[key] = {};
+@@ -79,7 +79,7 @@
+ }
+
+ var key = keys[keys.length - 1];
+- if (key === '__proto__') return;
++ if (isConstructorOrProto(o, key)) return;
+ if (o === Object.prototype || o === Number.prototype
+ || o === String.prototype) o = {};
+ if (o === Array.prototype) o = [];
+@@ -243,3 +243,7 @@
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+ }
+
++
++function isConstructorOrProto (obj, key) {
++ return key === 'constructor' && typeof obj[key] === 'function' || key ===
'__proto__';
++}
+--- a/test/proto.js
++++ b/test/proto.js
+@@ -42,3 +42,19 @@
+ t.equal(argv.y, undefined);
+ t.end();
+ });
++
++test('proto pollution (constructor function)', function (t) {
++ var argv = parse(['--_.concat.constructor.prototype.y', '123']);
++ function fnToBeTested() {}
++ t.equal(fnToBeTested.y, undefined);
++ t.equal(argv.y, undefined);
++ t.end();
++});
++
++// powered by snyk - https://github.com/backstage/backstage/issues/10343
++test('proto pollution (constructor function) snyk', function (t) {
++ var argv = parse('--_.constructor.constructor.prototype.foo bar'.split('
'));
++ t.equal((function(){}).foo, undefined);
++ t.equal(argv.y, undefined);
++ t.end();
++})
diff --git a/debian/patches/series b/debian/patches/series
index 81a5e8e..eee91a0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
nodejs.patch
+CVE-2021-44906.patch
--- End Message ---
--- Begin Message ---
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 ---