TP-Link TL-WR940N is vulnerable to a stack-based buffer overflow, caused by improper bounds checking by the ipAddrDispose function. By sending specially crafted ICMP echo request packets, a remote authenticated attacker could overflow a buffer and execute arbitrary code on the system with elevated privileges.
https://github.com/HellofHackers/Exploits
https://www.exploit-db.com/exploits/46678/
https://euvd.enisa.europa.eu/vulnerability/EUVD-2019-16540
http://packetstormsecurity.com/files/152458/TP-LINK-TL-WR940N-TL-WR941ND-Buffer-Overflow.html