Summary
A broken access control vulnerability in the TOTOLINK T6 router allows unauthenticated attackers to obtain a connected client's MAC address through the getStationMacByIp function.
The issue becomes risky when the router exposes the affected CGI endpoint without requiring authentication or enforcing authorization for client information requests.
Affected context
The vulnerability occurs in TOTOLINK T6 firmware 4.1.5cu.748_B20211015 when the router processes requests to /cgi-bin/cstecgi.cgi and invokes the getStationMacByIp function. Deployments are exposed when this endpoint accepts crafted POST requests without establishing that the requester is authorized to access client network information.
Exploit preconditions
- Attack surface: The router's CGI web interface, specifically
/cgi-bin/cstecgi.cgi - Required access: Network reachability to the router's management or exposed CGI service; authentication may not be required
- Trigger point: A crafted POST request that invokes
getStationMacByIp - Why exploitation is possible: The function does not adequately enforce access control before returning a client MAC address
Why this happens
The underlying bug is an authorization failure in a management interface. The affected function appears to process a client-information request without consistently verifying the caller's identity and permission to access that information.
This behavior maps to CWE-284: Improper Access Control, where a security-sensitive operation or resource is not protected by an effective authorization policy.
Potential impact
- An unauthenticated requester may obtain client MAC addresses
- Exposed device-identifying information could support network reconnaissance
- Attackers could correlate wireless or LAN clients with other observed activity
- Disclosed information could contribute to follow-on attacks against connected devices
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the CGI endpoint and within the affected function, rather than relying on the caller to provide trustworthy request parameters.
Common defensive patterns include:
- Require authentication and explicit authorization for client information queries
- Apply consistent access checks to every management API operation
- Return only the minimum client data necessary for the requested function
- Reduce exposure of administrative interfaces to untrusted networks
- Use secure-by-default management network boundaries and least-privilege service permissions
- Treat all request parameters as untrusted and validate them against authorized resources
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review checks for CGI handlers that return client data without centralized authorization
- Tests that invoke management endpoints with missing, invalid, or low-privilege credentials
- Review of routes that expose MAC addresses, host identifiers, or other network inventory data
- Web-server and router logs showing repeated POST requests to CGI endpoints from unauthorized sources
- Policy enforcement requiring authentication and authorization middleware for administrative APIs
Automated application-security testing can help identify endpoints that disclose sensitive information without appropriate access checks.

