CVE-2017-16026: Request Remote Memory Exposure Vulnerability

MODERATE
Advisory Identifier: GHSA-7xfp-9c55-5vqj
CVSS 5.9
CWE-201
Published
Advisory Summary

CVE-2017-16026 is a MODERATE (CVSS 5.9) remote memory exposure vulnerability (CWE-201: Insertion of Sensitive Information Into Sent Data) affecting Request libraries in the npm ecosystem. The issue involves remote memory exposure in request. Remediation is available by upgrading affected packages to version 2.68.0.

CVE-2017-16026 at a Glance

CVE Identifier CVE-2017-16026
GHSA Identifier GHSA-7xfp-9c55-5vqj
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-201: Insertion of Sensitive Information Into Sent Data
Affected Product Request
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2017-16026

To remediate this vulnerability, upgrade all affected Request dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

request fixed: 2.68.0
npm install request@2.68.0
request fixed: 2.68.0
npm install request@2.68.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls request

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2017-16026, inspect your project dependencies using npm:

npm ls request

Analyze the terminal output to locate any version of Request in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.68.0), your application is affected.

Note: The npm ls request command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-201: Insertion of Sensitive Information Into Sent Data, where the code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor. In Request, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Affected versions of `request` will disclose local system memory to remote systems in certain circumstances. When a multipart request is made, and the type of `body` is `number`, then a buffer of that size will be allocated and sent to the remote server as the body. ## Proof of Concept ```js var request = require('request'); var http = require('http'); var serveFunction = function (req, res){ req.on('data', function (data) { console.log(data) }); res.end(); }; var server = http.createServer(serveFunction); server.listen(8000); request({ method: "POST", uri: 'http://localhost:8000', multipart: [{body:500}] },function(err,res,body){}); ``` ## Recommendation Update to version 2.68.0 or later

CVE-2017-16026 Affected Request Versions

2 component(s)
Fixed Versions:
2.68.0
Product / Package Ecosystem Affected Versions Fixed Version
request
npm
≥ 2.49.0
< 2.68.0
2.68.0
request
npm
≥ 2.2.6
< 2.68.0
2.68.0

References

Frequently Asked Questions

What is CVE-2017-16026?
CVE-2017-16026 is a security vulnerability in Request involving Remote Memory Exposure in request under CWE-201: Insertion of Sensitive Information Into Sent Data.
Which Request versions are affected?
Affected versions include releases prior to 2.68.0 across affected packages: request.
What version fixes CVE-2017-16026?
Upgrading to 2.68.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is request affected?
Yes, request is affected in releases prior to 2.68.0. Upgrade your dependency to 2.68.0 or later.
What is the CVSS score of CVE-2017-16026?
CVE-2017-16026 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2017-16026?
CVE-2017-16026 is classified under CWE-201: Insertion of Sensitive Information Into Sent Data (The code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor.).
How can I check npm dependencies for CVE-2017-16026?
Run the dependency tree command: 'npm ls request'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7xfp-9c55-5vqj",
  "modified" : "2023-09-12T18:48:46Z",
  "published" : "2018-11-09T17:44:01Z",
  "aliases" : [ "CVE-2017-16026" ],
  "summary" : "Remote Memory Exposure in request",
  "details" : "Affected versions of `request` will disclose local system memory to remote systems in certain circumstances. When a multipart request is made, and the type of `body` is `number`, then a buffer of that size will be allocated and sent to the remote server as the body.\n\n## Proof of Concept\n\n```js\nvar request = require('request');\nvar http = require('http');\n\nvar serveFunction = function (req, res){\n\treq.on('data', function (data) {\n            console.log(data)\n        });\n\tres.end();\n};\nvar server = http.createServer(serveFunction);\nserver.listen(8000);\n\nrequest({\n\tmethod: \"POST\",\n\turi: 'http://localhost:8000',\n\tmultipart: [{body:500}]\n},function(err,res,body){});\n```\n\n\n## Recommendation\n\nUpdate to version 2.68.0 or later",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "request"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.49.0"
      }, {
        "fixed" : "2.68.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "request"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.6"
      }, {
        "fixed" : "2.68.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.47.0"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16026"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/issues/1904"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/pull/2018"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/pull/2022"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/request/request/commit/29d81814bc16bc79cb112b4face8be6fc00061dd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/request/request"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-201" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:23:42Z",
    "nvd_published_at" : null
  }
}