/

CVE-2026-26280

Severity:

HIGH RISK

(8.4)

OS Command Injection in systeminformation wifiNetworks()

CVE-2026-26280

Modified

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection vulnerability in the wifiNetworks() function of the Node.js systeminformation library allows arbitrary OS command execution when an attacker controls the network interface parameter.

The initial call sanitizes the interface value, but a retry path reuses the original unsanitized parameter in an execSync('iwlist ${iface} scan') call, enabling command execution with the privileges of the Node.js process when user input is passed through.

Affected context

The vulnerability occurs in Node.js applications that use the systeminformation library's wifiNetworks() function to enumerate Wi-Fi networks on Linux systems.

It is specifically exposed when application code passes user-influenced or otherwise untrusted data as the iface (network interface) parameter.

The risky behavior arises only along the retry path: when the initial sanitized scan returns no results, the library schedules a follow-up call using the original, unsanitized interface string in an OS command.

Exploit preconditions

  • Attack surface: Any API endpoint, CLI option, configuration value, or integration that forwards an attacker-controlled string into si.wifiNetworks(iface).
  • Required access: Ability to supply or influence the iface argument (e.g., HTTP request parameter, web form field, query string, or environment/config entry).
  • Trigger point: The initial wifiNetworks() call must yield an empty scan result so that the retry logic executes and invokes getWifiNetworkListIw(iface) with the unsanitized parameter.
  • Why exploitation is possible: The retry path bypasses earlier sanitization and interpolates the raw iface string into execSync('iwlist ${iface} scan'), enabling injection of shell metacharacters and additional commands.

Why this happens

The root cause is incomplete and inconsistent input sanitization around command construction.

In wifiNetworks(), the iface parameter is sanitized for the initial scan, but the retry logic later reuses the original, untrusted value and passes it directly into a shell command: execSync('iwlist ${iface} scan').

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, where user-controllable input is concatenated into a command string without proper escaping or safe argument handling.

The bug illustrates a common pattern: secondary code paths (retries, fallbacks, and error handlers) are not held to the same sanitization and validation standards as the primary execution path.

Potential impact

  • Execution of arbitrary shell commands with the privileges of the Node.js process
  • Access to local files, environment variables, and service credentials available to the application
  • Lateral movement within the host via installed tools or scripts
  • Data exfiltration or destruction on the underlying system
  • Use of the compromised process as a foothold for broader infrastructure compromise

General mitigation guidance

Effective mitigation focuses on avoiding string-based command construction and minimizing trust in external inputs:

  • Prefer command execution APIs that accept argument arrays and do not invoke a shell by default, reducing opportunities for injection.
  • Apply strict validation to any iface parameter at the application boundary, enforcing a whitelist of expected network interface names and character sets.
  • Ensure that all code paths, including retries and fallbacks, operate only on sanitized or validated values rather than original raw inputs.
  • Run Node.js processes with least privilege and constrained OS capabilities so that, if command execution occurs, the blast radius is limited.
  • Consider separating Wi-Fi scanning into a dedicated, locked-down helper service or process with reduced permissions, instead of invoking system tools directly within the main application runtime.

How teams detect issues like this

Detection can rely on both code-centric and operational approaches:

  • Static analysis: Scan for uses of child_process.exec / execSync where user-influenced parameters are interpolated into command strings, especially within utility libraries and retry logic.
  • Code review signals: Flag any API that accepts an interface or command-like string and later builds shell commands, paying special attention to error-handling and retry branches that may bypass sanitization.
  • Policy enforcement: Establish coding standards that discourage shell-based command composition in shared libraries and require centralized validation helpers for OS-level interactions.
  • Runtime monitoring: Observe application logs and process monitoring data for unusual invocations of iwlist or unexpected child processes spawned by Node.js services, which may indicate exploitation attempts.

Sources

SourceLink
github.comgithub.com/sebhildebrandt/systeminformation/commit/22242aa56188f2bffcbd7d265a11e1ebb808b460
github.comgithub.com/sebhildebrandt/systeminformation/security/advisories/GHSA-9c88-49p5-5ggf
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-26280
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2441121
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-26280.json

Frequently asked

questions

It can be remotely exploitable if a remote user can influence the iface value passed into wifiNetworks(), such as via a web API, UI parameter, or configuration option. If the interface parameter is strictly server-controlled and not influenced by user input, exploitation is less likely.

The attacker needs the ability to control or significantly influence the value of the iface argument used by si.wifiNetworks(). They do not need direct shell access; the vulnerable application effectively becomes the command execution vehicle.

Use only sanitized, validated interface names throughout all code paths, and avoid building shell commands by string concatenation. Where system utilities must be invoked, prefer safe process-spawning APIs with explicit argument lists and no shell involvement.

Treat all input as untrusted by default, enforce strict validation at entry points, and centralize command execution behind well-reviewed helper functions. During design and review, scrutinize retries, fallbacks, and error-handling branches to ensure they never reintroduce unsanitized data into security-sensitive operations such as command execution.

Find out what's already
exploitable in your codebase.