Command Injection

Affecting rpi package, ALL versions

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

Overview

rpi is a Node.js library to use the Raspberry Pi GPIOs.

Affected versions of this package are vulnerable to Command Injection. The variable pinNumbver in function GPIO within src/lib/gpio.js is used as part of the arguement of exec function without any sanitization.

PoC by JHU System Security Lab

var RPI = require("rpi");
var pin = new RPI.GPIO(';touch vulnerable.txt;', '123');

Remediation

There is no fixed version for rpi.

References

CVSS Score

7.5
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    None
  • Availability
    None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P/RL:U/RC:C
Credit
JHU System Security Lab
CVE
CVE-2019-10796
CWE
CWE-78
Snyk ID
SNYK-JS-RPI-548942
Disclosed
18 Feb, 2020
Published
18 Feb, 2020