CVE-2026-2391

3.7 LOW

📋 TL;DR

This vulnerability in the qs library allows attackers to bypass array size limits when comma-separated parsing is enabled, creating arbitrarily large arrays that can exhaust server memory. Applications using qs with the 'comma: true' configuration option are affected. This can lead to denial-of-service attacks through memory exhaustion.

💻 Affected Systems

Products:
  • qs library
Versions: All versions before the fix
Operating Systems: All
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when 'comma: true' option is explicitly enabled in qs configuration

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server unavailability due to memory exhaustion, requiring restart and potentially causing extended downtime.

🟠

Likely Case

Degraded performance or temporary service disruption as servers handle memory-intensive parsing requests.

🟢

If Mitigated

Minimal impact with proper input validation and rate limiting in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof of concept code is publicly available in the advisory

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version with commit f6a7abff1f13d644db9b05fe4f2c98ada6bf8482

Vendor Advisory: https://github.com/ljharb/qs/security/advisories/GHSA-w7fw-mjwx-w883

Restart Required: No

Instructions:

1. Update qs package to patched version. 2. Run 'npm update qs' or 'yarn upgrade qs'. 3. Verify the fix by testing with the PoC.

🔧 Temporary Workarounds

Disable comma parsing

all

Set 'comma: false' in qs configuration to disable vulnerable parsing mode

const options = { comma: false };

Input validation

all

Implement request size limits and validate parameter values before parsing

🧯 If You Can't Patch

  • Disable comma parsing by setting comma: false in all qs configurations
  • Implement WAF rules to block requests with excessive commas in query parameters

🔍 How to Verify

Check if Vulnerable:

Test with the provided PoC code using your application's qs configuration

Check Version:

npm list qs or check package.json for qs version

Verify Fix Applied:

Run the PoC test after patching - it should now throw 'Array limit exceeded' error

📡 Detection & Monitoring

Log Indicators:

  • Unusually large memory usage spikes
  • Process crashes or restarts
  • Slow response times during parsing

Network Indicators:

  • Requests with query parameters containing hundreds or thousands of commas
  • Repeated requests with comma-heavy parameters

SIEM Query:

search query_parameters contains "," count > 100

🔗 References

📤 Share & Export