Security researchers with HN Security have published technical details on two vulnerabilities affecting many Zyxel products.
Tracked as CVE-2022-26531 and CVE-2022-26532, the two security holes were addressed in late May 2022 with patches for multiple firewalls, access points (APs), and AP controllers.
The vulnerabilities impact the Zyxel zysh binary, a restricted shell that implements the command-line interface (CLI) on a variety of Zyxel products. The CLI can be accessed via SSH and Telnet (which is not enabled by default), or via a web console, reachable via a browser.
HN Security’s researchers identified multiple issues in the binary, including several stack-based buffer overflows in code that handles diagnostic tests, two stack-based buffer overflows in the “debug” and “ssh” commands, several format string bugs, and a command injection bug.
“We demonstrated the possibility, as an authenticated admin or limited-admin user, to exploit the format string bugs and the OS command injection vulnerability to escape the restricted shell environment and achieve arbitrary command execution on the underlying embedded Linux OS, respectively as regular user and as root,” the researchers say.
The identified buffer overflows, the researchers say, existed because of unsafe API function calls. In fact, the researchers note that the zysh binary does not pack modern countermeasures against exploitation of memory corruption bugs.
Despite that, however, the buffer overflows could not be exploited to achieve code execution.
“Some zysh commands implement a special ‘extension’ argument that allows to specify arbitrary command-line arguments to be passed to the invoked OS command that underlies each functionality. Any additional arguments we specify after the ‘extension’ keyword are appended to the OS command line. We identified format string bugs in multiple zysh commands that implement this feature,” HN Security says.
The researchers were able to exploit these format string bugs to achieve arbitrary code execution and to escape the restricted shell environment and have published proof-of-concept exploit code to prove that. They also note that automating and weaponizing the exploit might not be too hard.
Zyxel collectively assigned the identifier CVE-2022-26531 for the memory corruption bugs, but addressed the OS command injection issue – which is tracked as CVE-2022-26532 – separately.
This vulnerability, HN Security explains, was found in the code that handles the “packet-trace” command. The researchers discovered that they could abuse the “extension-filter” argument to “specify additional arbitrary command-line arguments to be passed to tcpdump,” which allowed them to execute arbitrary code as root.
On May 24, Zyxel published a security advisory to announce patches for CVE-2022-26531, CVE-2022-26532, and two other vulnerabilities impacting the same product range (tracked as CVE-2022-0734 and CVE-2022-0910).
Impacted products include USG/ZyWALL, USG FLEX, ATP, VPN, and NSG firewalls, NXC2500 and NXC5500 AP controllers, and nearly 30 access point products.
Related: Zyxel Firewall Vulnerability Exploitation Attempts Seen One Day After Disclosure
Related: Critical Vulnerability Allows Remote Hacking of Zyxel Firewalls
Related: Zyxel Warns Customers of Attacks on Security Appliances

More from Ionut Arghire
- New York Attorney General Fines Vendor for Illegally Promoting Spyware
- 20 Million Users Impacted by Data Breach at Instant Checkmate, TruthFinder
- Florida Hospital Cancels Procedures, Diverts Patients Following Cyberattack
- Former Ubiquiti Employee Who Posed as Hacker Pleads Guilty
- Atlassian Warns of Critical Jira Service Management Vulnerability
- Exploitation of Oracle E-Business Suite Vulnerability Starts After PoC Publication
- Google Shells Out $600,000 for OSS-Fuzz Project Integrations
- F5 BIG-IP Vulnerability Can Lead to DoS, Code Execution
Latest News
- Comcast Wants a Slice of the Enterprise Cybersecurity Business
- Critical Baicells Device Vulnerability Can Expose Telecoms Networks to Snooping
- New York Attorney General Fines Vendor for Illegally Promoting Spyware
- SecurityWeek Analysis: Over 450 Cybersecurity M&A Deals Announced in 2022
- 20 Million Users Impacted by Data Breach at Instant Checkmate, TruthFinder
- Cyber Insights 2023 | Zero Trust and Identity and Access Management
- Cyber Insights 2023 | The Coming of Web3
- European Police Arrest 42 After Cracking Covert App
