CVE-2026-2906
Stack-Based Buffer Overflow in Tenda HG9 Samba Configuration Endpoint
Publication date: 2026-02-22
Last updated on: 2026-02-23
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| tenda | hg9_firmware | 300001138 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-119 | The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. |
| CWE-121 | A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': 'CVE-2026-2906 is a critical stack-based buffer overflow vulnerability found in the Tenda HG9 router firmware version 300001138, specifically in the Samba Configuration Endpoint at /boaform/formSamba.'}, {'type': 'paragraph', 'content': 'The vulnerability occurs when the argument sambaCap is set to 1, causing the function to retrieve the user-supplied serverString parameter and use sprintf to format a system command string into a small fixed-size stack buffer of 64 bytes.'}, {'type': 'paragraph', 'content': "Because sprintf does not perform bounds checking, if serverString is longer than about 40 bytes, it overflows the buffer, overwriting the function's return address on the stack."}, {'type': 'paragraph', 'content': 'This unsafe use of sprintf without boundary checks leads to the stack-based buffer overflow.'}] [1, 2, 3]
How can this vulnerability impact me? :
[{'type': 'paragraph', 'content': 'This vulnerability can have two main impacts:'}, {'type': 'list_item', 'content': "Denial of Service (DoS): Overwriting the return address or stack can cause the router's HTTP daemon process to crash, making the web interface unresponsive."}, {'type': 'list_item', 'content': 'Remote Code Execution (RCE): An attacker can craft a payload to overwrite the return address with a pointer to malicious code, enabling arbitrary command execution with root privileges on the router.'}, {'type': 'paragraph', 'content': 'Because the exploit can be launched remotely without local access, it poses a severe security risk, potentially allowing attackers to fully compromise the device.'}] [1, 2, 3]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability can be detected by sending a crafted POST request to the vulnerable endpoint `/boaform/formSamba` with the parameter `sambaCap=1` and a `serverString` parameter containing a long string (e.g., 200 characters) to trigger the buffer overflow.'}, {'type': 'paragraph', 'content': 'A proof-of-concept Python script exists that demonstrates exploitation by sending such a POST request, which can be adapted for detection purposes.'}, {'type': 'paragraph', 'content': "For manual testing, you can use the following curl command to check if the system is vulnerable by observing if the router's web interface crashes or becomes unresponsive:"}, {'type': 'list_item', 'content': 'curl -X POST http://[router-ip]/boaform/formSamba -d "sambaCap=1&serverString=$(python3 -c \'print("A"*200)\')"'}, {'type': 'paragraph', 'content': 'If the router crashes or the web interface becomes unresponsive after this request, it indicates the presence of the vulnerability.'}] [1]
What immediate steps should I take to mitigate this vulnerability?
[{'type': 'paragraph', 'content': 'Immediate mitigation steps include:'}, {'type': 'list_item', 'content': "Avoid exposing the router's web interface to untrusted networks to reduce the risk of remote exploitation."}, {'type': 'list_item', 'content': 'Implement network-level filtering or firewall rules to block access to the `/boaform/formSamba` endpoint from unauthorized sources.'}, {'type': 'list_item', 'content': 'If possible, disable the Samba service or the vulnerable endpoint until a firmware update or patch is available.'}, {'type': 'list_item', 'content': "Monitor for unusual crashes or instability in the router's web interface, which may indicate exploitation attempts."}, {'type': 'paragraph', 'content': 'Long-term remediation involves updating the firmware to a version where the vulnerability is fixed by replacing unsafe `sprintf` calls with `snprintf`, enforcing input validation, or increasing buffer sizes.'}, {'type': 'paragraph', 'content': 'If no patch is available, consider replacing the affected device with a more secure alternative.'}] [1, 2]