<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Wed, 07 Oct 2026 08:18:14 +0000</lastBuildDate>
    <item>
      <title>GHSA-q8mj-m7cp-5q26 — qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/undefined entries in comma-format arrays…</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-q8mj-m7cp-5q26</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: qs&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;`qs.stringify` throws `TypeError` when called with `arrayFormat: &amp;#39;comma&amp;#39;` and `encodeValuesOnly: true` on an array containing `null` or `undefined`. The throw is synchronous and not handled by any of qs&amp;#39;s null-related options (`skipNulls`, `strictNullHandling`).&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;In the comma + `encodeValuesOnly` branch, `lib/stringify.js:145` mapped the array through the raw encoder before joining:&lt;/p&gt;
&lt;p&gt;```js
obj = utils.maybeMap(obj, encoder);
```&lt;/p&gt;
&lt;p&gt;`utils.encode` (`lib/utils.js:195`) reads `str.length` with no null guard, so a `null` or `undefined` element throws `TypeError`. `skipNulls` and `strictNullHandling` are both checked in the per-element loop below this line and never get a chance to run.&lt;/p&gt;
&lt;p&gt;Same class of bug as the filter-array path fixed in 0c180a4. The vulnerable shape of the comma + `encodeValuesOnly` branch was introduced in 4c4b23d (&amp;#34;encode comma values more consistently&amp;#34;, PR #463, 2023-01-19), first released in v6.11.1.&lt;/p&gt;
&lt;p&gt;#### PoC&lt;/p&gt;
&lt;p&gt;```js
const qs = require(&amp;#39;qs&amp;#39;);&lt;/p&gt;
&lt;p&gt;qs.stringify({ a: [null, &amp;#39;b&amp;#39;] },      { arrayFormat: &amp;#39;comma&amp;#39;, encodeValuesOnly: true });
qs.stringify({ a: [undefined, &amp;#39;b&amp;#39;] }, { arrayFormat: &amp;#39;comma&amp;#39;, encodeValuesOnly: true });
qs.stringify({ a: [null] },           { arrayFormat: &amp;#39;comma&amp;#39;, encodeValuesOnly: true });
// TypeError: Cannot read properties of null (reading &amp;#39;length&amp;#39;)
//     at encode (lib/utils.js:195:13)
//     at Object.maybeMap (lib/utils.js:322:37)
//     at stringify (lib/stringify.js:145:25)
```&lt;/p&gt;
&lt;p&gt;#### Fix&lt;/p&gt;
&lt;p&gt;`lib/stringify.js:14…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: qs&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;`qs.stringify` throws `TypeError` when called with `arrayFormat: &amp;#39;comma&amp;#39;` and `encodeValuesOnly: true` on an array containing `null` or `undefined`. The throw is synchronous and not handled by any of qs&amp;#39;s null-related options (`skipNulls`, `strictNullHandling`).&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;In the comma + `encodeValuesOnly` branch, `lib/stringify.js:145` mapped the array through the raw encoder before joining:&lt;/p&gt;
&lt;p&gt;```js
obj = utils.maybeMap(obj, encoder);
```&lt;/p&gt;
&lt;p&gt;`utils.encode` (`lib/utils.js:195`) reads `str.length` with no null guard, so a `null` or `undefined` element throws `TypeError`. `skipNulls` and `strictNullHandling` are both checked in the per-element loop below this line and never get a chance to run.&lt;/p&gt;
&lt;p&gt;Same class of bug as the filter-array path fixed in 0c180a4. The vulnerable shape of the comma + `encodeValuesOnly` branch was introduced in 4c4b23d (&amp;#34;encode comma values more consistently&amp;#34;, PR #463, 2023-01-19), first released in v6.11.1.&lt;/p&gt;
&lt;p&gt;#### PoC&lt;/p&gt;
&lt;p&gt;```js
const qs = require(&amp;#39;qs&amp;#39;);&lt;/p&gt;
&lt;p&gt;qs.stringify({ a: [null, &amp;#39;b&amp;#39;] },      { arrayFormat: &amp;#39;comma&amp;#39;, encodeValuesOnly: true });
qs.stringify({ a: [undefined, &amp;#39;b&amp;#39;] }, { arrayFormat: &amp;#39;comma&amp;#39;, encodeValuesOnly: true });
qs.stringify({ a: [null] },           { arrayFormat: &amp;#39;comma&amp;#39;, encodeValuesOnly: true });
// TypeError: Cannot read properties of null (reading &amp;#39;length&amp;#39;)
//     at encode (lib/utils.js:195:13)
//     at Object.maybeMap (lib/utils.js:322:37)
//     at stringify (lib/stringify.js:145:25)
```&lt;/p&gt;
&lt;p&gt;#### Fix&lt;/p&gt;
&lt;p&gt;`lib/stringify.js:14…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-q8mj-m7cp-5q26</guid>
    </item>
  </channel>
</rss>
