CVE-2019-10804: OS Command Injection in serial-number
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67849%
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 |
---|---|---|---|
serial-number | npm | <= 1.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the serialNumber
function's handling of the 'cmdPrefix' parameter. The code at line 106 (and related exec
calls) directly interpolates this user-controlled input into child_process.exec()
commands without sanitization. This matches the CWE-78 pattern where untrusted data flows into OS command execution. The advisory explicitly identifies this argument/exec
combination as the vulnerability source, and the provided code snippet confirms insecure command construction.