Miggo Logo

CVE-2019-10796: OS Command Injection in rpi

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.67841%
Published
4/13/2021
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
rpinpm<= 0.0.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

rpi t*rou** *.*.* *llows *x**ution o* *r*rit*ry *omm*n*s. T** v*ri**l* pinNum*v*r in *un*tion *PIO wit*in sr*/li*/*pio.js is us** *s p*rt o* t** *r*u*m*nt o* *x** *un*tion wit*out *ny s*nitiz*tion.

Reasoning

T** *or* vuln*r**ility st*ms *rom usin* us*r-*ontroll** pinNum**r in **il*_pro**ss.*x**() **lls wit*out prop*r s*nitiz*tion. T** *PIO *onstru*tor is t** prim*ry inj**tion point *s it *ir**tly pro**ss*s untrust** input. T** writ*() *n* r***() m*t*o*s