CVE-2019-10796: OS Command Injection in rpi
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67841%
CWE
Published
4/13/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
rpi | npm | <= 0.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The core vulnerability stems from using user-controlled pinNumber in child_process.exec() calls without proper sanitization. The GPIO constructor is the primary injection point as it directly processes untrusted input. The write() and read() methods inherit the vulnerability because they reuse the tainted pinNumber property. All three functions construct OS commands by concatenating untrusted input into exec() arguments, enabling command injection via shell metacharacters (e.g., '; malicious-command'). The provided PoC demonstrates exploitation through the constructor, and subsequent methods maintain the vulnerable pattern.