🇰🇷 한글 설명
node.js용 systeminformation 라이브러리 5.30.8 미만 버전에서 wifiNetworks() 함수를 통해 명령 주입(Command Injection) 취약점이 발생합니다. 네트워크 인터페이스 매개변수가 재시도 과정에서 적절히 검증되지 않아, 공격자가 임의의 OS 명령을 실행할 수 있습니다.
💡 쉬운 설명
와이파이 정보를 가져오는 프로그램의 오류로 인해, 나쁜 의도를 가진 명령어를 입력하면 컴퓨터가 이를 실행해버릴 수 있는 문제입니다. 이를 통해 해커가 사용자의 컴퓨터를 마음대로 조종할 위험이 있습니다.
🇺🇸 원문 (English)
systeminformation is a System and OS information library for node.js. In versions prior to 5.30.8, a command injection vulnerability in the `wifiNetworks()` function allows an attacker to execute arbitrary OS commands via an unsanitized network interface parameter in the retry code path. In `lib/wifi.js`, the `wifiNetworks()` function sanitizes the `iface` parameter on the initial call (line 437). However, when the initial scan returns empty results, a `setTimeout` retry (lines 440-441) calls `getWifiNetworkListIw(iface)` with the **original unsanitized** `iface` value, which is passed directly to `execSync('iwlist ${iface} scan')`. Any application passing user-controlled input to `si.wifiNetworks()` is vulnerable to arbitrary command execution with the privileges of the Node.js process. Version 5.30.8 fixes the issue.
📍 영향받는 시스템
systeminformation library versions prior to 5.30.8
⚔️ 공격 벡터
wifiNetworks() 함수의 iface 매개변수에 조작된 입력값을 전달하여 execSync를 통한 명령 실행
🛡️ 대응 방법
systeminformation 라이브러리를 5.30.8 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 5.30.8 미만이면 취약한 상태이며, 5.30.8 이상이면 안전합니다.
npm list systeminformation | grep -E 'systeminformation@'