Bug 1427872 (CVE-2017-1000048) - CVE-2017-1000048 nodejs-qs: Prototype override protection bypass
Summary: CVE-2017-1000048 nodejs-qs: Prototype override protection bypass
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-1000048
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1427876 1427874 1427875 1470072 1485934 1485935
Blocks: 1427873
TreeView+ depends on / blocked
 
Reported: 2017-03-01 12:49 UTC by Andrej Nemec
Modified: 2021-03-28 22:29 UTC (History)
30 users (show)

Fixed In Version: nodejs-qs 6.4.0, nodejs-qs 6.3.2, nodejs-qs 6.2.3, nodejs-qs 6.1.2, nodejs-qs 6.0.4
Doc Type: If docs needed, set a value
Doc Text:
It was found that ljharb's qs module for Node.js did not properly parse query strings. An attacker could send a specially crafted query that overwrites the resulting object's prototype properties (such as toString() or hasOwnProperty()), resulting in a denial of service when the overwritten function would be executed.
Clone Of:
Environment:
Last Closed: 2019-06-08 03:08:16 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2672 0 normal SHIPPED_LIVE Moderate: rh-nodejs6-nodejs-qs security update 2017-09-07 18:30:23 UTC

Description Andrej Nemec 2017-03-01 12:49:13 UTC
By default qs protects against attacks that attempt to overwrite an object's existing prototype properties, such as toString(), hasOwnProperty(),etc.

Overwriting these properties can impact application logic, potentially allowing attackers to work around security controls, modify data, make the application unstable and more.

In versions of the package affected by this vulnerability, it is possible to circumvent this protection and overwrite prototype properties and functions by prefixing the name of the parameter with [ or ]. e.g. qs.parse("]=toString") will return {toString = true}, as a result, calling toString() on the object will throw an exception.

References:

https://snyk.io/vuln/npm:qs:20170213

Upstream patches:

https://github.com/ljharb/qs/commit/beade029171b8cef9cee0d03ebe577e2dd84976d
https://github.com/ljharb/qs/commit/12152db9

Comment 1 Andrej Nemec 2017-03-01 12:52:35 UTC
Created nodejs-qs tracking bugs for this issue:

Affects: epel-6 [bug 1427875]
Affects: epel-7 [bug 1427876]
Affects: fedora-all [bug 1427874]

Comment 4 Cedric Buissart 2017-08-28 11:57:11 UTC
rh-nodejs4-nodejs-qs is based on nodejs-qs-1.2.2, which does not have support for the allowPrototypes options, and is thus not affected by this.

Comment 5 Cedric Buissart 2017-08-28 12:59:12 UTC
External References:

https://snyk.io/vuln/npm:qs:20170213

Comment 9 errata-xmlrpc 2017-09-07 14:30:57 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2017:2672 https://access.redhat.com/errata/RHSA-2017:2672

Comment 11 Jason Shepherd 2021-03-28 22:29:45 UTC
Statement:

Red Hat Quay include nodejs-qs as a build time dependency. Nodejs-qs is used by protractor for testing as build time, and is not included as runtime.


Note You need to log in before you can comment on or make changes to this bug.