Rapid7

module

Zyxel Firewall SUID Binary Privilege Escalation

Disclosed
Jun 14, 2022
Created
Aug 31, 2022

Description

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.

Author

jbaines-r7

Platform

Linux,Unix

Architectures

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
...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

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.