qs@6.16.0

A querystring parser that supports nesting and arrays, with a depth limit

  • latest version

    6.17.1

  • latest non vulnerable version

  • first published

    15 years ago

  • latest version published

    10 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the qs package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Improper Encoding or Escaping of Output

    qs is a querystring parser that supports nesting and arrays, with a depth limit.

    Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the stringify function when the allowEmptyArrays option is enabled. When an object key contains special characters (such as &, =, or #) and its value is an empty array, the key is returned without encoding, allowing an attacker who controls a key name to inject arbitrary query-string parameters or URL fragments into the serialized output. A consumer that parses the resulting string will see attacker-controlled key-value pairs that were not present in the original object.

    How to fix Improper Encoding or Escaping of Output?

    Upgrade qs to version 6.16.2 or higher.

    >=6.12.0 <6.16.2
    • H
    Uncaught Exception

    qs is a querystring parser that supports nesting and arrays, with a depth limit.

    Affected versions of this package are vulnerable to Uncaught Exception via stringify when arrayFormat: 'comma' is used with array elements that have a non-callable toString property. Such elements - as produced by JSON.parse, or by qs.parse under allowPrototypes or plainObjects (which yields null-prototype objects) - cause Array.prototype.join or utils.encode to throw a TypeError: Cannot convert object to primitive value, crashing the process.

    Note: This is only exploitable if the arrayFormat: 'comma' option is explicitly set.

    How to fix Uncaught Exception?

    Upgrade qs to version 6.16.1 or higher.

    >=6.7.0 <6.16.1