Bug 2065685 (CVE-2021-44907)

Summary: CVE-2021-44907 qs: Insufficient sanitization of property in the gs.parse function
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: amctagga, aos-bugs, bcoca, bdettelb, bmontgom, caswilli, cmeyers, davidn, dhalasz, dkuc, dwhatley, dymurray, eparis, fjansen, gblomqui, gparvin, hhorak, ibolton, jburrell, jcammara, jhadvig, jhardy, jkoehler, jmatthew, jmontleo, jobarker, jokerman, jorton, jramanat, jwong, kaycoth, ldap-maint, mabashia, micjohns, mrunge, njean, nodejs-maint, nodejs-sig, notting, nstielau, osapryki, pahickey, psegedy, relrod, rfreiman, rpetrell, sdoran, sgallagh, slucidi, smcdonal, sponnaga, sseago, stcannon, sthirugn, thrcka, tkasparek, tkuratom, tsasak, vkrizan, vkumar, vmugicag, zsvetlik
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-27 07:19:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2075666, 2076435    
Bug Blocks: 2065687    

Description Pedro Sampaio 2022-03-18 13:31:28 UTC
A Denial of Service vulnerability exists in qs up to 6.8.0 due to insufficient sanitization of property in the gs.parse function. The merge() function allows the assignment of properties on an array in the query. For any property being assigned, a value in the array is converted to an object containing these properties. Essentially, this means that the property whose expected type is Array always has to be checked with Array.isArray() by the user. This may not be obvious to the user and can cause unexpected behavior.

References:

https://jsfiddle.net/65jxksay/
https://jsfiddle.net/pb6an1dy/
https://github.com/ljharb/qs/blob/master/dist/qs.js#L670
https://github.com/ljharb/qs/issues/436