Claude-assisted RCE port reaches WAGO 750-831 PLC

Forescout Research's Vedere Labs used Anthropic's Claude to port a working pre-authentication remote code execution exploit from a WAGO 750-852 programmable logic controller to a WAGO 750-831 running firmware V01.04.16. The work achieved execution of attacker-supplied ARM shellcode on live hardware by exploiting CVE-2021-31886, a stack-based buffer overflow in the Nucleus FTP server.
The vulnerability is reachable before authentication through the FTP USER command on TCP port 21. Siemens assigns CVE-2021-31886 a CVSS score of 9.8. Forescout said the final RCE development phase took an 8-hour, 32-minute interactive session and consumed $535.74 in API usage.
How the exploit was adapted
Researchers supplied Claude Code with the existing exploit for the 750-852, a 750-831 firmware binary and a physical 750-831 target. The model had terminal access, Ghidra and the controller, while researchers continuously steered the sessions. Work started with Claude Sonnet 4.6 and shifted to Claude Opus 4.6 after early attempts stalled.
On the 750-831, normal FTP processing cleared 256 bytes at the attacker-controlled buffer, overwriting injected shellcode before execution. Claude adapted the prior USER-and-QUIT technique into a USER-and-CWD sequence. By omitting the CRLF terminator, the relevant processing path did not complete normally, leaving the buffer intact long enough for the payload to execute.
After establishing code execution, Claude moved from no-operation shellcode to two payloads in 12 minutes. One sent ICMP echo requests to an attacker-controlled system; the other transmitted a UDP packet containing the string PWNED. The exploit executes in the Ethernet receive callback context, and the demonstrated capability stops at sending network packets.
Operational risk remains central
Forescout stressed that the exercise did not show an autonomous agent independently attacking a controller. It also showed the danger of an authorized agent taking an incorrect action on physical equipment: a later session attempting to extend the exploit into a command-and-control implant wrote into flash-mapped memory and permanently bricked the PLC.
During the first session, the model also identified a possible flaw in the FTP command extraction loop that is separate from CVE-2021-31886. Manual review suggested it could be a previously unidentified vulnerability, but Forescout set it aside for further investigation and it has no CVE identifier.
Affected controllers and mitigations
CERT@VDE lists several WAGO fieldbus couplers and PLCs based on Nucleus V1 RTOS as affected, including the 750-829, 750-831/000-00x, 750-852, 750-880/0xx-xxx, 750-881, 750-882, 750-885/0xx-xxx, 750-889, 750-331 and 750-352/xxx-xxx within the stated firmware ranges. The advisory says updates are not available for this Nucleus version.
CERT@VDE advises owners to disable or block FTP on port 21, apply segmentation controls and monitor network traffic for anomalies. For businesses operating these controllers, the practical implication is to treat exposed legacy management services as an immediate containment priority and validate that compensating controls are enforced around affected PLCs.

