Skip to main content
Menu
Advisories

arrayLimit is not applied to comma values and repeated keys in @poppinss/qs

GHSA-FJF4-4X6M-FVX2Published Updated GitHub

Description

@poppinss/qs is a fork of qs 6.14.0 and does not have two upstream fixes for arrayLimit:

  • qs 6.14.2 (GHSA-w7fw-mjwx-w883): with comma: true, parseArrayValue() splits the value before the limit check.
  • qs 6.14.1 (GHSA-6rw7-vpxm-498p): utils.combine() joins repeated a[]= and a= keys with no limit.

@adonisjs/http-server 9.x parses each query string with comma: true and arrayLimit: 20 by default.

Steps

  1. Use a default app.
  2. Request /any-route?ids= followed by 10,000 commas.
  3. request.input('ids') is an array of 10,001 elements. throwOnLimitExceeded: true does not throw.
  4. Request /any-route?ids[]=1&ids[]=2&… with 1000 keys. The result is an array of 1000 elements.

Impact

One request costs about 1.2 ms to parse 16,000 elements, and the process keeps running. App code that does work for each element and trusts arrayLimit, for example whereIn('id', ids), can do much more work than the config allows.

Fix

Port the two upstream fixes. An over-limit array becomes an object, as indexed notation already does, or throws with throwOnLimitExceeded.

Credit

Ief Falot (GitHub: iefken). Reported by email on 2026-11-30.

Affected versions

References

GitHub · adonisjs/core