Command Injection

Affecting docker-compose-remote-api package, ALL versions

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

docker-compose-remote-api is a Connection interface between docker-compose and the Docker Remote API.

Affected versions of this package are vulnerable to Command Injection. Within index.js of the package, the function exec(serviceName, cmd, fnStdout, fnStderr, fnExit) uses the variable serviceName which can be controlled by users without any sanitization.

PoC

var Root = require("docker-compose-remote-api");
var root = Root({cwd:__dirname}).exec("& touch vulnerable.txt");

Remediation

There is no fixed version for docker-compose-remote-api.

References

CVSS Score

6.5
medium severity
  • Attack Vector
    Network
  • Attack Complexity
    High
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    Low
  • Availability
    None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:U/RC:C
Credit
JHU System Security Lab
CVE
CVE-2020-7606
CWE
CWE-79
Snyk ID
SNYK-JS-DOCKERCOMPOSEREMOTEAPI-560125
Disclosed
13 Mar, 2020
Published
13 Mar, 2020