NodeJS/request/2.27.0
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.2.0 | Apache-2.0 | 2 | 2011-11-06 - 01:40 | over 13 years |
2.1.1 | Apache-2.0 | 2 | 2011-08-23 - 03:59 | over 13 years |
2.1.0 | Apache-2.0 | 2 | 2011-08-15 - 04:03 | over 13 years |
2.0.5 | Apache-2.0 | 2 | 2011-08-13 - 21:46 | over 13 years |
2.0.4 | Apache-2.0 | 2 | 2011-08-13 - 21:28 | over 13 years |
2.0.3 | Apache-2.0 | 2 | 2011-08-12 - 23:16 | over 13 years |
2.0.2 | Apache-2.0 | 2 | 2011-07-29 - 20:48 | almost 14 years |
2.0.1 | Apache-2.0 | 2 | 2011-07-21 - 22:22 | almost 14 years |
2.0.0 | Apache-2.0 | 2 | 2011-07-21 - 21:10 | almost 14 years |
1.9.9 | Apache-2.0 | 2 | 2011-07-21 - 02:03 | almost 14 years |
1.9.8 | Apache-2.0 | 2 | 2011-06-23 - 21:15 | almost 14 years |
1.9.7 | Apache-2.0 | 2 | 2011-06-23 - 17:36 | almost 14 years |
1.9.5 | Apache-2.0 | 2 | 2011-03-27 - 22:30 | about 14 years |
1.9.3 | Apache-2.0 | 2 | 2011-03-22 - 18:32 | about 14 years |
1.9.2 | Apache-2.0 | 2 | 2011-03-22 - 18:29 | about 14 years |
1.9.1 | Apache-2.0 | 2 | 2011-03-22 - 18:07 | about 14 years |
1.9.0 | Apache-2.0 | 2 | 2011-02-11 - 00:10 | about 14 years |
1.2.0 | Apache-2.0 | 2 | 2011-01-30 - 22:05 | over 14 years |
1.1.1 | Apache-2.0 | 2 | 2011-01-23 - 01:38 | over 14 years |
1.1.0 | Apache-2.0 | 2 | 2011-01-23 - 01:14 | over 14 years |
1.0.0 | Apache-2.0 | 2 | 2011-01-22 - 00:36 | over 14 years |
0.10.0 | Apache-2.0 | 2 | 2011-01-22 - 00:36 | over 14 years |
0.9.5 | Apache-2.0 | 2 | 2011-01-22 - 00:36 | over 14 years |
0.9.1 | Apache-2.0 | 2 | 2011-01-22 - 00:36 | over 14 years |
0.9.0 | Apache-2.0 | 2 | 2011-01-22 - 00:36 | over 14 years |
0.8.3 | Apache-2.0 | 2 | 2011-01-22 - 00:36 | over 14 years |