/

CVE-2026-58457

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in Aitemi M300 Repeater

CVE-2026-58457

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution with Root Privileges

Severity:

CRITICAL RISK

(9.8)

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

Shenzhen Aitemi M300 Wi-Fi Repeater (MT02) exposes an unauthenticated OS command injection flaw in its commuos web backend.

Network-adjacent attackers can craft malicious HTTP GET parameters that are embedded into shell commands, enabling arbitrary code execution with root privileges on the device.

Affected context

This vulnerability manifests in the embedded web management interface of the Aitemi M300 Wi-Fi Repeater.

It is relevant when the device's commuos backend is reachable over the local network (e.g., LAN or Wi-Fi) and processes requests to the smacfilter_conf handler.

In typical deployments, the interface is exposed to users on the same network segment, and the absence of authentication or robust input validation allows crafted parameters to flow into shell commands.

Exploit preconditions

  • Attack surface: HTTP interface of the commuos web backend, specifically the smacfilter_conf handler.
  • Required access: Network-adjacent access (same LAN/Wi-Fi segment) to send HTTP GET requests to the device; no authentication required.
  • Trigger point: Submission of crafted name, enable, or mac GET parameters containing semicolon-delimited command payloads.
  • Why exploitation is possible: User-controlled values are concatenated via sprintf() into UCI-related shell command strings and executed by doSystemCmdComlib() without sanitization or escaping, allowing command chaining.

Why this happens

The core bug is direct inclusion of untrusted input into shell command strings, followed by execution via a system command wrapper.

By using sprintf() to build UCI shell commands from the name, enable, and mac GET parameters and then passing those commands into doSystemCmdComlib(), the backend treats user data as part of the shell syntax.

This aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command, where meta-characters such as semicolons are not neutralized, enabling attackers to append arbitrary commands.

Potential impact

  • Attackers may execute arbitrary shell commands with root privileges on the repeater.
  • Device configuration could be altered, reset, or permanently corrupted.
  • The repeater could be converted into a pivot point for further attacks on the local network.
  • Malware or botnet agents could be installed on the device.
  • Sensitive network information (e.g., Wi-Fi credentials, internal IP mappings) could be exposed.

General mitigation guidance

Effective mitigation focuses on eliminating direct command construction from user input and reducing the device's exposure.

Common patterns include:

  • Replacing shell-based command execution with parameterized system APIs or libraries that avoid invoking the shell.
  • Strictly validating and whitelisting inputs for configuration fields (e.g., MAC addresses and names) before processing.
  • Neutralizing or rejecting shell metacharacters and enforcing predictable formats for all web parameters.
  • Running device services with least privilege where possible and separating configuration logic from execution paths.
  • Limiting external management exposure (for example, by restricting access to trusted network segments and disabling remote administration when not needed).

How teams detect issues like this

Detection often relies on reviewing how command execution is implemented and monitored:

  • Static analysis rules can flag use of command execution wrappers (e.g., system, popen, or custom helpers like doSystemCmdComlib()) that concatenate user-controlled data.
  • Code reviews should look for sprintf() or similar string-building functions that incorporate HTTP parameters into OS-level commands.
  • Security testing (including fuzzing and dynamic analysis) can attempt to inject command separators and observe unexpected behavior.
  • Policy-based enforcement in firmware development pipelines can require that any command execution path pass through input validation and escaping routines, with automated checks to detect violations.

Sources

SourceLink
github.comgithub.com/IEATASICS/m300-repeater-bugs#
aliexpress.usaliexpress.us/item/3256806767641280.html
vulncheck.comvulncheck.com/advisories/shenzhen-aitemi-m300-mt02-unauthenticated-os-command-injection-via-protocol-csp

Frequently asked

questions

It is primarily exploitable by network-adjacent attackers—those who can reach the repeater's web interface over the LAN or Wi-Fi. Internet-based exploitation depends on whether remote administration or port forwarding exposes the interface externally.

No. The vulnerable smacfilter_conf handler is accessible without authentication, so an attacker does not need a valid account to inject commands.

The most robust fix is to stop building shell commands from user input entirely and instead use dedicated system configuration APIs. If shell invocation is unavoidable, inputs should be strictly validated, normalized, and passed as parameters rather than concatenated into command strings.

Design management interfaces so that user input is never translated directly into shell syntax, enforce strong input validation and whitelisting, use secure coding guidelines for command execution, and incorporate security-focused code review and automated checks into the development lifecycle for embedded products.

Find out what's already
exploitable in your codebase.