NodeJS/request/2.9.200
Simplified HTTP request client.
https://www.npmjs.com/package/request
Apache-2.0
3 Security Vulnerabilities
Remote Memory Exposure in request
- https://nvd.nist.gov/vuln/detail/CVE-2017-16026
- https://github.com/advisories/GHSA-7xfp-9c55-5vqj
- https://github.com/request/request/issues/1904
- https://github.com/request/request/pull/2018
- https://www.npmjs.com/advisories/309
- https://nodesecurity.io/advisories/309
- https://github.com/request/request/pull/2022
- https://github.com/request/request/commit/29d81814bc16bc79cb112b4face8be6fc00061dd
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
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
Server-Side Request Forgery in Request
- https://nvd.nist.gov/vuln/detail/CVE-2023-28155
- https://github.com/request/request/issues/3442
- https://github.com/request/request/pull/3444
- https://doyensec.com/resources/Doyensec_Advisory_RequestSSRF_Q12023.pdf
- https://github.com/advisories/GHSA-p8p7-x288-28g6
- https://security.netapp.com/advisory/ntap-20230413-0007/
- https://github.com/github/advisory-database/pull/2500
- https://github.com/cypress-io/request/blob/master/lib/redirect.js#L116
- https://github.com/request/request/blob/master/lib/redirect.js#L111
- https://github.com/cypress-io/request/pull/28
- https://github.com/cypress-io/request/commit/c5bcf21d40fb61feaff21a0e5a2b3934a440024f
- https://github.com/cypress-io/request/releases/tag/v3.0.0
- https://security.netapp.com/advisory/ntap-20230413-0007
The request package through 2.88.2 for Node.js and the @cypress/request package prior to 3.0.0 allow a bypass of SSRF mitigations via an attacker-controller server that does a cross-protocol redirect (HTTP to HTTPS, or HTTPS to HTTP).
NOTE: The request package is no longer supported by the maintainer.
Remote Memory Exposure
Request is an http client.
If a request is made using multipart, and the body type is a number, then the specified number of non-zero memory is passed in the body.
Example to reproduce: ``` 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){});
```
126 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 2.39.0 | Apache-2.0 | 3 | 2014-07-24 - 02:20 | over 11 years |
| 2.38.0 | Apache-2.0 | 3 | 2014-07-22 - 13:44 | over 11 years |
| 2.37.0 | Apache-2.0 | 3 | 2014-07-07 - 17:24 | over 11 years |
| 2.36.0 | Apache-2.0 OR Version 2.0 | 3 | 2014-05-19 - 20:58 | over 11 years |
| 2.35.0 | Apache-2.0 OR Version 2.0 | 3 | 2014-05-17 - 20:56 | over 11 years |
| 2.34.0 | Apache-2.0 OR Version 2.0 | 3 | 2014-02-18 - 19:35 | over 11 years |
| 2.33.0 | Apache-2.0 | 3 | 2014-01-16 - 19:48 | almost 12 years |
| 2.32.0 | Apache-2.0 | 3 | 2014-01-16 - 19:33 | almost 12 years |
| 2.31.0 | Apache-2.0 | 3 | 2014-01-08 - 02:57 | almost 12 years |
| 2.30.0 | Apache-2.0 | 3 | 2013-12-13 - 19:17 | almost 12 years |
| 2.29.0 | Apache-2.0 | 3 | 2013-12-06 - 20:05 | almost 12 years |
| 2.28.0 | Apache-2.0 | 3 | 2013-12-04 - 19:42 | almost 12 years |
| 2.27.0 | Apache-2.0 | 3 | 2013-08-15 - 21:30 | about 12 years |
| 2.26.0 | Apache-2.0 | 3 | 2013-08-07 - 16:31 | about 12 years |
| 2.25.0 | Apache-2.0 | 3 | 2013-07-23 - 21:51 | over 12 years |
| 2.24.0 | Apache-2.0 | 3 | 2013-07-23 - 20:51 | over 12 years |
| 2.23.0 | Apache-2.0 | 3 | 2013-07-23 - 02:45 | over 12 years |
| 2.22.0 | Apache-2.0 | 3 | 2013-07-05 - 17:12 | over 12 years |
| 2.21.0 | Apache-2.0 | 3 | 2013-04-30 - 21:28 | over 12 years |
| 2.20.0 | Apache-2.0 | 3 | 2013-04-22 - 21:49 | over 12 years |
| 2.19.0 | Apache-2.0 | 3 | 2013-04-22 - 16:48 | over 12 years |
| 2.18.0 | Apache-2.0 | 3 | 2013-04-22 - 15:53 | over 12 years |
| 2.16.6 | Apache-2.0 | 3 | 2013-03-18 - 22:48 | over 12 years |
| 2.16.4 | Apache-2.0 | 3 | 2013-03-18 - 19:16 | over 12 years |
| 2.16.2 | Apache-2.0 | 3 | 2013-03-13 - 20:46 | over 12 years |
| 2.16.0 | Apache-2.0 | 3 | 2013-03-13 - 17:48 | over 12 years |
| 2.14.0 | Apache-2.0 | 3 | 2013-02-19 - 23:53 | over 12 years |
| 2.12.0 | Apache-2.0 | 3 | 2012-11-09 - 21:49 | almost 13 years |
| 2.11.4 | Apache-2.0 | 3 | 2012-09-17 - 19:34 | about 13 years |
| 2.11.3 | Apache-2.0 | 3 | 2012-09-17 - 19:20 | about 13 years |
| 2.11.2 | Apache-2.0 | 3 | 2012-09-17 - 19:19 | about 13 years |
| 2.11.1 | Apache-2.0 | 3 | 2012-09-04 - 15:20 | about 13 years |
| 2.11.0 | Apache-2.0 | 3 | 2012-08-29 - 19:18 | about 13 years |
| 2.10.0 | Apache-2.0 | 3 | 2012-08-01 - 20:56 | about 13 years |
| 2.9.203 | Apache-2.0 | 3 | 2012-06-28 - 19:58 | over 13 years |
| 2.9.202 | Apache-2.0 | 3 | 2012-04-14 - 01:48 | over 13 years |
| 2.9.201 | Apache-2.0 | 3 | 2012-04-12 - 17:44 | over 13 years |
| 2.9.200 | Apache-2.0 | 3 | 2012-04-08 - 00:41 | over 13 years |
| 2.9.153 | Apache-2.0 | 3 | 2012-03-01 - 23:43 | over 13 years |
| 2.9.152 | Apache-2.0 | 3 | 2012-02-25 - 20:55 | over 13 years |
| 2.9.151 | Apache-2.0 | 3 | 2012-02-24 - 23:08 | over 13 years |
| 2.9.150 | Apache-2.0 | 3 | 2012-02-24 - 17:53 | over 13 years |
| 2.9.100 | Apache-2.0 | 3 | 2012-01-20 - 21:25 | almost 14 years |
| 2.9.3 | Apache-2.0 | 3 | 2011-12-28 - 01:49 | almost 14 years |
| 2.9.2 | Apache-2.0 | 3 | 2011-12-28 - 01:04 | almost 14 years |
| 2.9.1 | Apache-2.0 | 3 | 2011-12-28 - 01:02 | almost 14 years |
| 2.9.0 | Apache-2.0 | 3 | 2011-12-28 - 00:47 | almost 14 years |
| 2.2.9 | Apache-2.0 | 3 | 2011-12-01 - 08:39 | almost 14 years |
| 2.2.6 | Apache-2.0 | 3 | 2011-12-01 - 07:38 | almost 14 years |
| 2.2.5 | Apache-2.0 | 1 | 2011-11-17 - 06:35 | almost 14 years |
