CVE-2026-2391: qs Package Array Limit Bypass Leading to Denial of Service

qs Updated 12 Feb 2026

Summary

12/02/2026
Yes i
Low
3.7

CVE-2026-2391: qs's arrayLimit bypass in comma parsing allows denial of service. Affects qs versions < 6.14.2. Fixed in 6.14.2. How to fix ↓

Also tracked for

The same CVE-2026-2391 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The 'qs' package is a widely used library in the Node.js ecosystem for parsing query strings. It allows developers to convert query strings into JavaScript objects, supporting both standard and comma-separated values. The package is known for its flexibility and ease of use, making it a popular choice for handling query parameters in web applications. However, a vulnerability has been identified that allows attackers to bypass the array limit, potentially leading to memory exhaustion and denial of service.

Vulnerability Detail

The vulnerability arises from the 'arrayLimit' option in the 'qs' package, which does not enforce limits for comma-separated values when the 'comma' option is enabled. This allows attackers to create arbitrarily large arrays from a single parameter, leading to excessive memory allocation. The issue occurs because the limit check for 'arrayLimit' is performed after the logic that handles comma-separated values, enabling a bypass. As a result, attackers can send a single parameter with a large number of commas, causing the application to exhaust memory resources.

How To Fix

Latest published version: 6.16.1 as of 22 Oct 2026

npm install qs@6.16.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.14.2

This is the first release that contains the fix.

npm install qs@6.14.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot update the package immediately, consider implementing input validation to limit the size of incoming query parameters. For example, you can check the length of the query string before parsing it with 'qs'. Here is a sample code snippet:

const qs = require('qs');
const maxQueryLength = 1000; // Set a maximum length for query strings

const payload = req.query; // Assuming req.query contains the query parameters
if (JSON.stringify(payload).length > maxQueryLength) {
    throw new Error('Query string too long');
}

const parsed = qs.parse(payload);

Conclusion

CVE-2026-2391 is a vulnerability in the 'qs' package that allows attackers to bypass the array limit, leading to potential denial of service through memory exhaustion. It is crucial to update to version 6.14.2 or later to mitigate this risk. Implementing input validation can serve as a temporary workaround.

See every vulnerability recorded for qs →

Share this vulnerability

FAQ

The impact of this vulnerability is a potential denial of service (DoS) due to memory exhaustion, which can cause applications to crash or become unresponsive.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By checking your package-lock.json file, Vulert can help identify if your application is affected by this vulnerability.

Versions of 'qs' up to and including 6.14.1 are affected by this vulnerability. Version 6.14.2 and later contain the fix.

Yes, you can implement input validation to limit the size of incoming query parameters as a temporary workaround until you can update the package.

The CVSS score for CVE-2026-2391 is 3.7, indicating a low severity level.

Related vulnerabilities

Recent vulnerabilities recorded for qs.

How To Fix

Latest published version: 6.16.1 as of 22 Oct 2026

npm install qs@6.16.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.14.2

This is the first release that contains the fix.

npm install qs@6.14.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback