Rapid7 Vulnerability & Exploit Database

Zyxel Firewall SUID Binary Privilege Escalation

Back to Search

Zyxel Firewall SUID Binary Privilege Escalation



This module exploits CVE-2022-30526, a local privilege escalation vulnerability that allows a low privileged user (e.g. nobody) escalate to root. The issue stems from a suid binary that allows all users to copy files as root. This module overwrites the firewall's crontab to execute an attacker provided script, resulting in code execution as root. In order to use this module, the attacker must first establish shell access. For example, by exploiting CVE-2022-30525. Known affected Zyxel models are: USG FLEX (50, 50W, 100W, 200, 500, 700), ATP (100, 200, 500, 700, 800), VPN (50, 100, 300, 1000), USG20-VPN and USG20W-VPN.


  • jbaines-r7




cmd, mips64


Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/local/zyxel_suid_cp_lpe
msf exploit(zyxel_suid_cp_lpe) > show targets
msf exploit(zyxel_suid_cp_lpe) > set TARGET < target-id >
msf exploit(zyxel_suid_cp_lpe) > show options
    ...show and set options...
msf exploit(zyxel_suid_cp_lpe) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security