MediumGHSA-7xfp-9c55-5vqjCVE-2017-16026
Remote Memory Exposure in request
Published 9 Nov 2018 · Updated 8 Nov 2023
Affected packages
requestnpm
- Affected
- >=2.49.0 <2.68.0
- Fixed in
- 2.68.0
Update to the fixed version for your release line, for example:
npm install request@2.68.0requestnpm
- Affected
- >=2.2.6 <2.68.0
- Fixed in
- 2.68.0
Update to the fixed version for your release line, for example:
npm install request@2.68.0Details
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
Is GHSA-7xfp-9c55-5vqj in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected request, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.