ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection - Nessus
High Plugin ID: 144454This page contains detailed information about the ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.
Plugin Overview
ID: 144454
Name: ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection
Filename: imagemagick_7_0_10-40.nasl
Vulnerability Published: 2020-11-21
This Plugin Published: 2020-12-18
Last Modification Time: 2021-06-03
Plugin Version: 1.4
Plugin Type: local
Plugin Family: Windows
Dependencies:
imagemagick_installed.nasl
Required KB Items [?]: installed_sw/ImageMagick
Vulnerability Information
Severity: High
Vulnerability Published: 2020-11-21
Patch Published: 2020-11-21
CVE [?]: CVE-2020-29599
CPE [?]: cpe:/a:imagemagick:imagemagick
Synopsis
The remote Windows host has an application installed that is affected by a command injection vulnerability.
Description
The remote Windows host has a version of ImageMagick installed that is prior to 6.9.11-40 or 7.x prior to 7.0.10-4. It is, therefore, affected by a command injection vulnerability via the -authenticate option.
Solution
Upgrade to ImageMagick version 6.9.11-40 or 7.0.10-40 or later.
Note that you may need to manually uninstall the vulnerable version from the system.
Public Exploits
Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (GitHub)
Exploit Ease: Exploits (PoCs) are available
Here's the list of publicly known exploits and PoCs for verifying the ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection vulnerability:
- GitHub: https://github.com/barrracud4/image-upload-exploits
[CVE-2020-29599] - GitHub: https://github.com/coco0x0a/CVE-2020-29599
[CVE-2020-29599] - GitHub: https://github.com/genjix2/CVE-2020-29599
[CVE-2020-29599]
Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.
WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.
Risk Information
CVSS Score Source [?]: CVE-2020-29599
CVSS V2 Vector: AV:N/AC:M/Au:N/C:P/I:P/A:P/E:U/RL:OF/RC:C
CVSS Base Score: | 6.8 (Medium) |
Impact Subscore: | 6.4 |
Exploitability Subscore: | 8.6 |
CVSS Temporal Score: | 5.0 (Medium) |
CVSS Environmental Score: | NA (None) |
Modified Impact Subscore: | NA |
Overall CVSS Score: | 5.0 (Medium) |
CVSS Base Score: | 7.8 (High) |
Impact Subscore: | 5.9 |
Exploitability Subscore: | 1.8 |
CVSS Temporal Score: | 6.8 (Medium) |
CVSS Environmental Score: | NA (None) |
Modified Impact Subscore: | NA |
Overall CVSS Score: | 6.8 (Medium) |
STIG Risk Rating: High
Go back to menu.
Plugin Source
This is the imagemagick_7_0_10-40.nasl nessus plugin source code. This script is Copyright (C) 2020-2021 and is owned by Tenable, Inc. or an Affiliate thereof.
#
# (C) Tenable Network Security, Inc.
#
include('compat.inc');
if (description)
{
script_id(144454);
script_version("1.4");
script_set_attribute(attribute:"plugin_modification_date", value:"2021/06/03");
script_cve_id("CVE-2020-29599");
script_xref(name:"IAVB", value:"2020-B-0076-S");
script_name(english:"ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection");
script_set_attribute(attribute:"synopsis", value:
"The remote Windows host has an application installed that is affected by a command injection vulnerability.");
script_set_attribute(attribute:"description", value:
"The remote Windows host has a version of ImageMagick installed that is prior to 6.9.11-40 or 7.x prior to 7.0.10-4.
It is, therefore, affected by a command injection vulnerability via the -authenticate option.");
script_set_attribute(attribute:"see_also", value:"https://github.com/ImageMagick/ImageMagick/discussions/2851");
# https://insert-script.blogspot.com/2020/11/imagemagick-shell-injection-via-pdf.html
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?7aef1910");
script_set_attribute(attribute:"solution", value:
"Upgrade to ImageMagick version 6.9.11-40 or 7.0.10-40 or later.
Note that you may need to manually uninstall the vulnerable version from the system.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-29599");
script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
script_set_attribute(attribute:"vuln_publication_date", value:"2020/11/21");
script_set_attribute(attribute:"patch_publication_date", value:"2020/11/21");
script_set_attribute(attribute:"plugin_publication_date", value:"2020/12/18");
script_set_attribute(attribute:"plugin_type", value:"local");
script_set_attribute(attribute:"cpe", value:"cpe:/a:imagemagick:imagemagick");
script_set_attribute(attribute:"stig_severity", value:"I");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Windows");
script_copyright(english:"This script is Copyright (C) 2020-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("imagemagick_installed.nasl");
script_require_keys("installed_sw/ImageMagick");
exit(0);
}
include('vcf.inc');
include('vcf_extras.inc');
vcf::imagemagick::initialize();
app_info = vcf::imagemagick::get_app_info();
constraints = [
{ 'fixed_version':'6.9.11.40' },
{ 'min_version':'7.0.0.0', 'fixed_version':'7.0.10.40'}
];
vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
The latest version of this script can be found in these locations depending on your platform:
- Linux / Unix:
/opt/nessus/lib/nessus/plugins/imagemagick_7_0_10-40.nasl
- Windows:
C:\ProgramData\Tenable\Nessus\nessus\plugins\imagemagick_7_0_10-40.nasl
- Mac OS X:
/Library/Nessus/run/lib/nessus/plugins/imagemagick_7_0_10-40.nasl
Go back to menu.
How to Run
Here is how to run the ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection as a standalone plugin via the Nessus web user interface (https://localhost:8834/):
- Click to start a New Scan.
- Select Advanced Scan.
- Navigate to the Plugins tab.
- On the top right corner click to Disable All plugins.
- On the left side table select Windows plugin family.
- On the right side table select ImageMagick < 6.9.11-40 / 7.x < 7.0.10-40 -authenticate Option Command Injection plugin ID 144454.
- Specify the target on the Settings tab and click to Save the scan.
- Run the scan.
Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.
Basic usage:
/opt/nessus/bin/nasl imagemagick_7_0_10-40.nasl -t <IP/HOST>
Run the plugin with audit trail message on the console:
/opt/nessus/bin/nasl -a imagemagick_7_0_10-40.nasl -t <IP/HOST>
Run the plugin with trace script execution written to the console (useful for debugging):
/opt/nessus/bin/nasl -T - imagemagick_7_0_10-40.nasl -t <IP/HOST>
Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):
/opt/nessus/bin/nasl -K /tmp/state imagemagick_7_0_10-40.nasl -t <IP/HOST>
Go back to menu.
References
IAVB | Information Assurance Vulnerability Bulletin:
- 2020-B-0076-S
- https://www.tenable.com/plugins/nessus/144454
- https://github.com/ImageMagick/ImageMagick/discussions/2851
- http://www.nessus.org/u?7aef1910
- https://vulners.com/nessus/IMAGEMAGICK_7_0_10-40.NASL
- 146629 - Amazon Linux 2 : ImageMagick (ALAS-2021-1596)
- 146570 - Amazon Linux AMI : ImageMagick (ALAS-2021-1479)
- 146883 - CentOS 7 : ImageMagick (CESA-2021:0024)
- 144925 - Debian DLA-2523-1 : imagemagick security update
- 145211 - EulerOS 2.0 SP3 : ImageMagick (EulerOS-SA-2021-1074)
- 145752 - EulerOS 2.0 SP8 : ImageMagick (EulerOS-SA-2021-1147)
- 146668 - EulerOS 2.0 SP2 : ImageMagick (EulerOS-SA-2021-1305)
- 148047 - EulerOS 2.0 SP5 : ImageMagick (EulerOS-SA-2021-1682)
- 149483 - FreeBSD : ImageMagick6 -- multiple vulnerabilities (3e0ca488-b3f6-11eb-a5f7-a0f3c100ae18)
- 149489 - FreeBSD : ImageMagick7 -- multiple vulnerabilities (a7c60af1-b3f1-11eb-a5f7-a0f3c100ae18)
- 145561 - GLSA-202101-36 : ImageMagick: Command injection
- 154636 - NewStart CGSL CORE 5.04 / MAIN 5.04 : ImageMagick Vulnerability (NS-SA-2021-0100)
- 154537 - NewStart CGSL CORE 5.05 / MAIN 5.05 : ImageMagick Vulnerability (NS-SA-2021-0186)
- 145361 - openSUSE Security Update : ImageMagick (openSUSE-2021-136)
- 145394 - openSUSE Security Update : ImageMagick (openSUSE-2021-148)
- 144748 - Oracle Linux 7 : ImageMagick (ELSA-2021-0024)
- 144753 - RHEL 7 : ImageMagick (RHSA-2021:0024)
- 144744 - Scientific Linux Security Update : ImageMagick on SL7.x i686/x86_64 (2021:0024)
- 145198 - SUSE SLED15 / SLES15 Security Update : ImageMagick (SUSE-SU-2021:0153-1)
- 145181 - SUSE SLED15 / SLES15 Security Update : ImageMagick (SUSE-SU-2021:0156-1)
- 38951 - ImageMagick < 6.5.2-9 magick/xwindow.c XMakeImage() Function TIFF File Handling Overflow
- 72721 - ImageMagick < 6.8.7-6 WritePSDImage PSD Handling Memory Corruption
- 72722 - ImageMagick < 6.8.8-5 Multiple PSD Handling Buffer Overflows
- 91232 - ImageMagick 6.x < 6.9.4-0 / 7.x < 7.0.1-2 Multiple Vulnerabilities
- 90892 - ImageMagick < 7.0.1-1 / 6.x < 6.9.3-10 Multiple Vulnerabilities (ImageTragick)
- 100847 - ImageMagick 6.x < 6.9.8-10 / 7.x < 7.0.5-9 Multiple Vulnerabilities
- 122248 - ImageMagick < 7.0.8-25 Multiple Vulnerabilities
- 124776 - ImageMagick < 7.0.8-44 Multiple vulnerabilities
- 160159 - EulerOS 2.0 SP8 : ImageMagick (EulerOS-SA-2022-1570)
- 150515 - SUSE SLES11 Security Update : ImageMagick (SUSE-SU-2021:14598-1)
- 150793 - Ubuntu 18.04 LTS / 20.04 LTS / 20.10 : ImageMagick vulnerabilities (USN-4988-1)
Version
This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file imagemagick_7_0_10-40.nasl version 1.4. For more plugins, visit the Nessus Plugin Library.
Go back to menu.