ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

Update qs dep to ^6.2.4 for prototype poisoning security fix #1784

Closed mgwedd closed 1 year ago

mgwedd commented 1 year ago

Changes

qs < 6.2.4 has a major security issue, which this simple bump to qs ^6.2.4 would resolve. I chose the minimum version possible with this sec fix to avoid any breaking changes, however, the lib should be brought to current in a more thorough change as well.

Context

[qs](https://www.npmjs.com/package/qs) is a querystring parser that supports nesting and arrays, with a depth limit.

Affected versions of this package are vulnerable to Prototype Poisoning which allows attackers to cause a Node process to hang, processing an Array object whose prototype has been replaced by one with an excessive length value.

Note: In many typical Express use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as a[__proto__]=b&a[__proto__]&a[length]=100000000.

Checklist

🚧 Awaiting workflow approval to confirm CI & linting runs