For example, you found an rce on the web server and this rce allows code execution for the http server, so you can send yourself a variable that holds the hashed username and password, but if the authentication is done by a low-level system API and someone who has access to the web server cannot access the permissions of this API, then it is difficult to obtain the password. Sorry, although the question seems very general, I think most home tplink modems use a similar technology. What I mean is, is the cgi performing the authentication or is the web server doing this independently of the cgi?