CVE-2025-51390: TOTOLINK N600R command injection in setWiFiWpsConfig

CVE-2025-51390 · Severity: critical · CVSS 9.8 · Published 2025-08-04

A vulnerability exists in the TOTOLINK N600R wireless router, a device used to provide internet connectivity in homes and small offices. An attacker can remotely take full control of the router by sending a specially crafted request to the Wi-Fi Protected Setup (WPS) configuration settings. This could allow an unauthorized user to intercept network traffic, disrupt internet service, or use the device as a foothold for further attacks on the local network.

Technologies: TOTOLINK N600r. Vendors: TOTOLINK.

Quick answers

Is CVE-2025-51390 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-51390 being exploited in the wild.
How severe is CVE-2025-51390?
Critical severity, with a CVSS score of 9.8, published 4 August 2025.
Which products and versions are affected?
TOTOLINK N600r 4.3.0cu.7647_B20210106, 4.3.0cu.7866_B20220506.
Is there a fix for CVE-2025-51390?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2025-51390 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2025-51390?
Check whether you run TOTOLINK N600r or TOTOLINK N600r Firmware at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

An OS command injection vulnerability exists in the 'cstecgi.cgi' component of TOTOLINK N600R firmware (specifically versions 4.3.0cu.7647_B20210106 and 4.3.0cu.7866_B20220506). The flaw is located in the setWiFiWpsConfig function (offset 0x41caac) where the 'pin' parameter is insufficiently sanitized before being passed to a system shell command. A remote, unauthenticated attacker can exploit this by sending a crafted JSON request to the 'UploadCustomModule/setWiFiWpsConfig' endpoint containing shell metacharacters (e.g., backticks) in the 'pin' field. Successful exploitation results in arbitrary command execution with the privileges of the web server. Additionally, a related stack-based buffer overflow was identified at offset 0x41ca08 due to unsafe use of strncpy.

Affected products

  • TOTOLINK N600R 4.3.0cu.7647_B20210106, 4.3.0cu.7866_B20220506

Timeline

  • 2025-08-04: advisory: Initial NVD publication
  • 2025-08-05: other: CISA-ADP enrichment and CVSS scoring added

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.