Summary
An incorrect access-control condition in the TOTOLINK T6 router's getWanIeCfg function exposes LAN addressing and DHCP configuration information through the web interface.
An unauthenticated attacker may retrieve this information by sending a specially crafted POST request to /cgi-bin/cstecgi.cgi, when the affected endpoint is reachable.
Affected context
The vulnerability occurs in TOTOLINK T6 firmware 4.1.5cu.748_B20211015 when the getWanIeCfg function processes requests through the /cgi-bin/cstecgi.cgi endpoint. Risk is higher when the router's management interface is reachable by an untrusted network and the endpoint does not consistently enforce authentication or authorization before returning configuration data.
Exploit preconditions
- Attack surface: The router's HTTP or HTTPS management interface and the
/cgi-bin/cstecgi.cgiendpoint - Required access: Network connectivity to the exposed management service; authentication may not be required
- Trigger point: Processing of a crafted POST request invoking the
getWanIeCfgfunctionality - Why exploitation is possible: The endpoint may return LAN addressing and DHCP configuration data without adequately verifying the caller's authorization
Why this happens
The underlying bug is an access-control failure in a configuration-retrieval handler. The function exposes sensitive network information without reliably applying an authentication and authorization decision before processing the request and generating a response. This behavior maps to CWE-284: Improper Access Control, in which a security-sensitive resource or operation is not restricted according to the intended access policy.
Potential impact
- An attacker may learn internal LAN addressing details
- An attacker could obtain DHCP configuration information useful for network reconnaissance
- Exposed topology data may support follow-on attacks against local devices
- Disclosure may help an attacker refine phishing, spoofing, or lateral-movement attempts
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every configuration-information endpoint and minimizing the data returned to unauthenticated callers.
Common defensive patterns include:
- Requiring authentication and explicit authorization before invoking configuration handlers
- Applying a consistent access-control policy across all CGI actions, including legacy functions
- Returning only the minimum information required for an authorized operation
- Restricting management interfaces to trusted administrative networks or dedicated management paths
- Separating read-only and administrative privileges where possible
- Preventing exposure of router management services to untrusted networks by default
How teams detect issues like this
Organizations can look for this issue through:
- Static analysis of CGI handlers for missing authentication or authorization checks
- Code review of functions that return LAN, DHCP, WAN, or other network configuration data
- Dynamic testing that verifies unauthenticated requests cannot access protected configuration endpoints
- Web-server and router logs showing POST requests to configuration handlers from unexpected sources
- Policy enforcement requiring centralized authorization checks for every management API operation
- Automated security testing tools that compare endpoint behavior before and after authentication

