Cloudanix VulnDB

CVE-2023-47218

Medium · 5.8

CVSS

5.8

EPSS

89.9%

Published

Feb 13, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Attend

Some QNAP storage systems can be tricked over the network into running attacker commands, which could put stored files and backups at risk unless the devices are updated.

Weaponized
Exploitation
Adjacent Network
Attacker needs
None
Complexity
High
Impact
Remote Code Execution
Component
Application
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

This vulnerability is an unauthenticated OS command injection issue in affected QNAP operating systems: QTS, QuTS hero, and QuTScloud. A vulnerable network-accessible component improperly handles input that can be interpreted by the underlying operating system shell, allowing an attacker on an adjacent network path to execute arbitrary commands. The CVSS vector indicates no credentials or user interaction are required, but exploitation requires adjacent-network access and higher attack complexity. Successful exploitation can compromise confidentiality, integrity, and availability at a limited but meaningful level, including reading selected data, modifying system state, staging malware, creating persistence, or disrupting NAS services depending on the privileges of the vulnerable process.

Why it matters to the business

A compromised QNAP NAS can expose stored business files, backups, application data, and shared folders to theft or tampering, and may be used as a foothold for lateral movement inside the network. Because NAS devices often hold critical operational data and backups, even limited command execution can create business disruption, data-loss risk, and incident-response costs. The vulnerability is not currently listed in CISA KEV and is not specifically marked as ransomware-used, but the EPSS score is very high and exploit maturity is weaponized, so internet- or broadly network-reachable QNAP systems should be treated as high-priority remediation targets.

How an attack unfolds

An attacker first identifies a reachable QNAP NAS running an affected QTS, QuTS hero, or QuTScloud version. Because the flaw is remotely reachable over the network and does not require authentication, the attacker sends crafted input to the vulnerable service or management interface from an adjacent network position. The crafted input includes shell metacharacters or command payloads that the vulnerable component passes to the operating system. If exploitation succeeds, the device executes attacker-controlled commands under the privileges of the affected service. The attacker may then enumerate the system, read configuration and file-share data, download additional tooling, create scheduled tasks or startup persistence, modify accounts or SSH settings, and use the NAS as a staging point to access internal systems or tamper with backups.

How to fix it

Upgrade affected QNAP operating systems to the vendor-fixed versions or later: QTS 5.1.5.2645 build 20240116 or later; QuTS hero h5.1.5.2647 build 20240118 or later; QuTScloud c5.1.5.2651 or later. If immediate upgrade is not possible, restrict access to QNAP management and service interfaces to trusted administrative networks only, block exposure from untrusted VLANs, VPN pools, guest Wi-Fi, and the internet, and disable unused QNAP services. Enforce strong administrative authentication, review remote-access features, disable UPnP port forwarding, and ensure backups are offline or immutable. Because exploitation is weaponized and EPSS is high, mitigation should be considered temporary and not a substitute for upgrading.

How to confirm the fix worked

Confirm the installed QNAP OS version and build number from the QNAP administration interface or command line and verify it is at or above the fixed version for the relevant product family. Run authenticated vulnerability scans or configuration checks that compare installed firmware against QNAP fixed releases. Validate that QNAP management interfaces are not reachable from untrusted networks and that firewall rules restrict access to approved administrative sources. After patching, retest with a safe, non-destructive command-injection validation method or vendor-supported scanner, and confirm that crafted shell metacharacters are rejected, escaped, or not executed. Review system logs after upgrade to ensure no unexpected processes, new users, persistence mechanisms, or suspicious outbound connections remain.

Typical attack path

  1. Discover QNAP NAS devices reachable from the local, VPN, wireless, or otherwise adjacent network segment.
  2. Fingerprint the device and operating system version to determine whether QTS, QuTS hero, or QuTScloud is below the fixed release.
  3. Send crafted network requests containing OS command-injection syntax to the vulnerable component.
  4. Validate command execution using low-noise commands such as id, uname, whoami, or file-write tests.
  5. Execute follow-on commands to enumerate users, shares, firmware version, network configuration, and mounted volumes.
  6. Download or stage tools using curl, wget, tftp, scp, or busybox applets if available.
  7. Attempt persistence through cron jobs, startup scripts, modified service configuration, added SSH keys, or unauthorized users.
  8. Access, copy, encrypt, delete, or alter stored files and backups, or use the NAS as a foothold for lateral movement.

How to detect it

To determine whether exploitation already occurred, review QNAP system event logs, QuLog Center records, web access/error logs, authentication logs, SSH logs, cron/task scheduler entries, application logs, and network telemetry for the period before and after patching. Look for unauthenticated requests containing shell metacharacters such as semicolons, pipes, backticks, command substitution, URL-encoded command separators, or commands commonly used for reconnaissance and payload staging. Investigate cases where QNAP web or service processes spawn shells or utilities such as sh, bash, busybox, wget, curl, tftp, nc, chmod, or crontab. Examine newly created users, changed admin settings, added SSH authorized_keys files, unexpected scheduled tasks, modified startup scripts, suspicious files in temporary or public share locations, and outbound connections from the NAS to unfamiliar IP addresses or domains. Because public reporting does not identify a single stable exploit URI or payload for this CVE, detection should focus on command-execution behaviors, suspicious process ancestry, anomalous administrative changes, and network egress from the NAS.

  • ;id
  • ; whoami
  • ;whoami
  • ; uname
  • ;uname -a
  • | id
  • | whoami
  • `id`
  • `whoami`
  • $(id)
  • $(whoami)
  • %3Bid
  • %3Bwhoami
  • %7Cid
  • %7Cwhoami
  • %60id%60
  • %60whoami%60
  • %24%28id%29
  • %24%28whoami%29
  • /bin/sh
  • /bin/bash
  • sh -c
  • bash -c
  • busybox wget
  • busybox nc
  • wget http
  • wget https
  • curl http
  • curl https
  • tftp -g
  • chmod +x
  • /etc/passwd
  • /etc/shadow
  • /root/.ssh/authorized_keys
  • /home/httpd/.ssh/authorized_keys
  • /etc/config/crontab
  • crontab -e
  • /tmp/
  • /var/tmp/
  • /dev/shm/
  • /share/Public/
  • nc -e
  • netcat -e

What your security team should do

  • Inventory all QNAP QTS, QuTS hero, and QuTScloud systems, including NAS devices in branch offices, labs, backup networks, and virtual/cloud deployments.
  • Prioritize upgrades to QTS 5.1.5.2645 build 20240116 or later, QuTS hero h5.1.5.2647 build 20240118 or later, and QuTScloud c5.1.5.2651 or later.
  • Treat exposed or broadly reachable vulnerable systems as urgent due to weaponized exploit maturity and very high EPSS probability.
  • Restrict QNAP administrative and service interfaces to trusted management networks and remove internet, guest-network, and unnecessary VPN exposure.
  • Search historical logs for command-injection patterns, suspicious child processes, unauthorized account changes, new SSH keys, cron modifications, and unexpected outbound downloads.
  • If compromise is suspected, isolate the NAS, preserve logs and volatile evidence, rotate credentials and tokens stored on or used by the device, and verify backup integrity before restoring services.
  • Harden QNAP devices by disabling unused apps/services, disabling UPnP, enforcing MFA where available, and monitoring for firmware drift.
  • Add SIEM detections for shell metacharacters in QNAP web/service logs and for web-service processes spawning shells, download utilities, or network tools.

The record

An OS command injection vulnerability has been reported to affect several QNAP operating system versions. If exploited, the vulnerability could allow users to execute commands via a network. We have already fixed the vulnerability in the following versions: QTS 5.1.5.2645 build 20240116 and later QuTS hero h5.1.5.2647 build 20240118 and later QuTScloud c5.1.5.2651 and later

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities