🇰🇷 한글 설명
systeminformation 라이브러리의 networkInterfaces() 함수에서 Linux 환경에서 NetworkManager 연결 프로필 이름이 제대로 살균되지 않아 명령 인젝션 공격이 가능합니다. 공격자가 셸 메타문자를 포함한 네트워크 프로필 이름을 생성하면 execSync()를 통해 임의의 명령을 실행할 수 있습니다. 5.31.6 버전에서 패치되었습니다.
💡 쉬운 설명
Node.js 라이브러리가 네트워크 정보를 읽을 때 악의적인 네트워크 이름이 명령어로 실행될 수 있습니다. 이 라이브러리를 사용하는 서버는 공격자가 명령을 실행할 수 있으므로 즉시 업데이트가 필요합니다.
🇺🇸 원문 (English)
systeminformation is a System and OS information library for node.js. From 4.17.0 to 5.31.5, on Linux, systeminformation is vulnerable to command injection in networkInterfaces() when an active NetworkManager connection profile name contains shell metacharacters. The vulnerable value is obtained internally from real nmcli device status output. The library sanitizes the network interface name before using it in shell commands, but it does not apply equivalent sanitization to the parsed NetworkManager connection profile name. That unsanitized connectionName is then interpolated into three shell command strings executed through execSync(). This vulnerability is fixed in 5.31.6.
📍 영향받는 시스템
Linux에서 systeminformation 4.17.0 ~ 5.31.5 버전
⚔️ 공격 벡터
NetworkManager 연결 프로필 이름에 셸 메타문자(예: ; | & $ 등)를 주입하여 networkInterfaces() 호출 시 임의 명령 실행
🛡️ 대응 방법
npm update systeminformation로 5.31.6 이상으로 즉시 업그레이드
🔧 검증 코드
버전이 5.31.6 이상이면 매치되어 안전, 매치 안 되면 취약한 버전
npm list systeminformation 2>/dev/null | grep systeminformation | awk '{print $2}' | grep -E '^(5\.(3[2-9]|[4-9])|[6-9])'