Summary
A critical access-control vulnerability in the TOTOLINK T6 allows unauthenticated attackers to change access-device policies through a crafted HTTP POST request. The issue becomes risky when the router management interface exposes the affected endpoint without verifying the caller's identity or authorization.
Affected context
The vulnerability occurs in the setAccessDeviceCfg function of TOTOLINK T6 firmware 4.1.5cu.748_B20211015. It affects deployments where the router's CGI interface accepts requests to /cgi-bin/cstecgi.cgi and the access-device configuration operation does not enforce authentication or adequate authorization. Exposure may depend on whether the management interface is reachable from an attacker's network position.
Exploit preconditions
- Attack surface: The router's HTTP CGI management interface
- Required access: Network reachability to the affected endpoint; authentication may not be required
- Trigger point: A crafted POST request invoking the access-device configuration operation
- Why exploitation is possible: The function permits a configuration-changing action without properly validating the caller's authorization
Why this happens
The underlying bug is a failure to enforce authorization at a security-sensitive configuration operation. The setAccessDeviceCfg function appears to trust a request that reaches the CGI handler instead of requiring authenticated access and verifying that the requester is permitted to change access-device policies. This behavior maps to CWE-284, Improper Access Control, because access to a protected administrative action is not sufficiently restricted.
Potential impact
- An attacker may alter access-device policies without authorization.
- Network access restrictions could be weakened or redirected.
- Legitimate users may lose connectivity or be improperly denied access.
- The device configuration could be changed in ways that support further network compromise.
- Unauthorized policy changes could reduce the router's security posture.
General mitigation guidance
Mitigation generally focuses on enforcing authorization consistently for every
configuration-changing handler.
Common defensive patterns include:
- Require authentication before processing administrative configuration requests.
- Apply operation-level authorization checks inside the configuration function, not only at the routing layer.
- Use secure-by-default access policies and deny unauthorized changes by default.
- Reduce trust in client-supplied fields by validating identity, scope, type, and allowed values server-side.
- Restrict management interfaces to trusted administration networks and limit device privileges where supported.
- Record and review configuration changes, including the authenticated actor and source context.
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis that identifies configuration-changing handlers without nearby authentication and authorization checks.
- Code review signals such as direct use of request parameters in policy updates or reliance on client-provided identity fields.
- Dynamic testing that submits unauthenticated requests to administrative CGI operations and verifies that state remains unchanged.
- Network monitoring for unexpected POST requests to management endpoints and unexplained access-policy changes.
- CI policy enforcement requiring authorization tests for every security-sensitive management operation.
Automated security review tools may help identify missing access-control checks, but findings should be validated against the device's request-routing and session model.

