qs query parameter injection in empty-array serialization
ljharb qs
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ljharb qs |
| No fix yet |
Original description
### Summary
`qs.stringify` with `allowEmptyArrays: true` writes the key of an empty array without encoding it, even though keys are encoded by default. A key that contains `&` (or the configured `delimiter`), `=`, or `#` therefore becomes query string syntax instead of data, so a caller-supplied key name can add parameters to the serialized query string, or cut it short.