CVE-2026-31255
Command Injection in Tenda AC18 Samba Configuration Interface
Publication date: 2026-04-27
Last updated on: 2026-04-28
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| tenda | ac18_firmware | 15.03.05.05 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-77 | The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-31255 is a command injection vulnerability in Tenda AC18 routers running firmware version V15.03.05.05_multi. It exists in the /goform/SetSambaCfg interface due to improper handling of the guestuser parameter.
The vulnerability occurs because the guestuser value from an HTTP request is stored persistently without sanitization and later used directly in a system command execution function. This allows an attacker to inject shell metacharacters that break out of the intended command context and execute arbitrary system commands.
It is a second-order command injection, meaning the malicious payload is stored first and executed on a subsequent request. Exploitation requires an authenticated attacker to submit a crafted POST request with malicious input in the guestuser parameter.
How can this vulnerability impact me? :
Successful exploitation of this vulnerability can lead to full device compromise.
- Arbitrary system command execution
- Unauthorized access to sensitive data
- Modification of system settings
- Potential disruption of router availability
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by checking for the presence of malicious payloads in the guestuser parameter of POST requests to the /goform/SetSambaCfg interface on the Tenda AC18 router.
Detection involves monitoring authenticated POST requests to the router's web interface and inspecting the guestuser parameter for shell metacharacters or suspicious commands such as semicolons or command injection patterns.
Example commands to detect exploitation attempts include using network traffic capture tools like tcpdump or Wireshark to filter HTTP POST requests to /goform/SetSambaCfg and searching for suspicious guestuser values.
- Use tcpdump to capture POST requests: tcpdump -i <interface> -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | grep '/goform/SetSambaCfg'
- Inspect captured HTTP POST data for guestuser parameter containing shell metacharacters like ";" or commands such as wget.
Additionally, authenticated access to the router's web interface can be used to manually check or script requests to the /goform/SetSambaCfg endpoint to verify if the guestuser parameter is vulnerable.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include restricting access to the router's web interface to trusted users only, ensuring strong authentication credentials to prevent unauthorized access.
Avoid using or exposing the /goform/SetSambaCfg interface unless necessary, and monitor for any suspicious activity related to the guestuser parameter.
If possible, update the router firmware to a version that patches this vulnerability or apply vendor-provided patches.
As a temporary workaround, disable remote management of the router's web interface to reduce the attack surface.
Regularly audit router configurations and logs for signs of exploitation or unauthorized changes.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability allows an authenticated attacker to execute arbitrary system commands on the affected Tenda AC18 router, leading to full device compromise.
This compromise can result in unauthorized access to sensitive data, modification of system settings, and potential disruption of router availability.
Such unauthorized access and potential data exposure could negatively impact compliance with data protection standards and regulations like GDPR and HIPAA, which require safeguarding sensitive information and ensuring system integrity.