Command Injection
Description
Command injection in macfromip npm package allows arbitrary command execution via crafted IP input.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Command injection in macfromip npm package allows arbitrary command execution via crafted IP input.
Vulnerability
Overview
CVE-2020-7786 is a command injection vulnerability in the macfromip npm package, affecting all versions. The injection points are located at lines 66 and 96 in macfromip.js, where user-supplied input is passed unsanitized to system commands [1][2].
Exploitation
An attacker can exploit this by providing a specially crafted IP address string containing shell metacharacters (e.g., &, ;, |) to the getMacInLinux or getMacInWin32 functions. The provided proof-of-concept demonstrates that passing "& touch JHU" as the IP argument results in execution of the injected command [2]. No authentication or special privileges are required beyond the ability to call the vulnerable functions.
Impact
Successful exploitation allows arbitrary command execution on the host system with the privileges of the Node.js process. This can lead to full system compromise, data exfiltration, or further lateral movement within the network.
Mitigation
As of the publication date, there is no fixed version of macfromip. The package appears to be unmaintained. Users are advised to avoid using this package or to implement strict input validation and sanitization as a workaround [1][2].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
macfromipnpm | <= 1.1.1 | — |
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-vh8f-xw5v-8993ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-7786ghsaADVISORY
- snyk.io/vuln/SNYK-JS-MACFROMIP-1048336ghsax_refsource_MISCWEB
- www.npmjs.com/package/macfromipghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.