Summary
An OS command injection flaw in Cisco RV130/RV130W and RV110W routers allows arbitrary commands to be executed through the start_bonjour() function of the rc binary.
When an authenticated attacker controls the wan_hostname configuration parameter, they can inject shell commands that run with root privileges on the device.
Affected context
This vulnerability arises in the management plane of Cisco RV130/RV130W and RV110W small business routers when processing the wan_hostname configuration value.
It is relevant in deployments where:
- Web-based or API configuration interfaces are exposed to authenticated users over the network
- Router firmware versions include the vulnerable
rcbinary andstart_bonjour()implementation - User-supplied hostname values are incorporated into shell-level operations without robust sanitization
Exploit preconditions
- Attack surface: Remote management interface (web UI or equivalent configuration channel)
- Required access: Valid authenticated access capable of setting or modifying the
wan_hostnameparameter - Trigger point: Invocation of the
start_bonjour()function in thercbinary after the malicious hostname is saved and processed - Why exploitation is possible: The
wan_hostnamevalue is concatenated into shell commands without sufficient validation or escaping, enabling command injection.
Why this happens
The underlying bug class is OS command injection (CWE-78), where untrusted input is embedded into system shell commands.
In this case, the start_bonjour() function in the rc binary uses the wan_hostname configuration value directly in command-line construction, likely via shell or system utilities, without strict filtering or argument separation.
This insecure pattern treats a user-controlled string as part of an executable command, allowing attackers to append additional shell metacharacters and commands that the router executes with root privileges.
Potential impact
- An attacker may execute arbitrary OS commands as root on the router.
- The device configuration could be altered, backdoors installed, or services disabled.
- Network traffic could be monitored, redirected, or manipulated from the compromised router.
- The router could be enlisted into botnets or used as a pivot point for further attacks inside the network.
- Logs and security settings can be tampered with to hide malicious activity.
General mitigation guidance
Effective mitigation focuses on eliminating the ability for user-controlled data to influence shell command structure.
Common defensive patterns include:
- Avoiding direct shell invocation for configuration tasks and using library APIs or system calls with explicit argument separation.
- Strictly validating and normalizing hostname input against a well-defined whitelist of allowed characters and length.
- Applying output encoding or safe argument passing mechanisms that prevent shell metacharacters from being interpreted.
- Running management-plane processes with the least privileges practical so that, if a command injection occurs, impact is constrained.
- Designing configuration flows so that user-supplied values are never concatenated into command strings without rigorous checks.
How teams detect issues like this
High-level detection approaches can include:
- Static analysis rules that flag calls where user-input variables are passed into shell-building functions (e.g.,
system,popen, backticks) without sanitization. - Code review practices that require explicit justification and validation for any use of shell commands in configuration handling logic.
- Secure coding policies that prohibit constructing command strings from configuration parameters, enforced via automated linting or SAST tools.
- Runtime monitoring for unusual command patterns or unexpected processes spawned by router management components, where feasible.

