Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961) - Nessus

Critical   Plugin ID: 130263

This page contains detailed information about the Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 130263
Name: Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961)
Filename: coldfusion_apsb18-33_file_upload_direct.nasl
Vulnerability Published: 2018-09-25
This Plugin Published: 2019-10-25
Last Modification Time: 2022-01-24
Plugin Version: 1.11
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: coldfusion_detect.nasl, os_fingerprint.nasl
Required KB Items [?]: installed_sw/ColdFusion

Vulnerability Information


Severity: Critical
Vulnerability Published: 2018-09-25
Patch Published: 2019-03-01
CVE [?]: CVE-2018-15961
CPE [?]: cpe:/a:adobe:coldfusion

Synopsis

The remote web server contains an application that is affected by an arbitrary file upload vulnerability.

Description

An arbitrary file upload vulnerability exists in Adobe ColdFusion due to insufficient validation in the filemanager plugin. An unauthenticated, remote attacker can exploit this, via a specially crafted POST request, to upload arbitrary files on the remote host.

Solution

Upgrade to Adobe ColdFusion 11 Update 15, 2016 Update 7, or 2018 Update 1 or later

Public Exploits


Target Network Port(s): 80, 8500
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961) vulnerability:

  1. Metasploit: exploit/multi/http/coldfusion_ckeditor_file_upload
    [Adobe ColdFusion CKEditor unrestricted file upload]
  2. Exploit-DB: exploits/multiple/webapps/45979.txt
    [EDB-45979: Adobe ColdFusion 2018 - Arbitrary File Upload]
  3. GitHub: https://github.com/0xAJ2K/CVE-2018-15961
    [CVE-2018-15961]
  4. GitHub: https://github.com/dudacgf/ovr_convert
    [CVE-2018-15961]
  5. GitHub: https://github.com/orangmuda/CVE-2018-15961
    [CVE-2018-15961: CVE-2018-15961 — ᴀᴅᴏʙᴇ ᴄᴏʟᴅғᴜsɪᴏɴ (ʀᴄᴇ)]
  6. GitHub: https://github.com/oxctdev/CVE-2018-15961
    [CVE-2018-15961: CVE-2018-15961 — ᴀᴅᴏʙᴇ ᴄᴏʟᴅғᴜsɪᴏɴ (ʀᴄᴇ)]
  7. GitHub: https://github.com/xbufu/CVE-2018-15961
    [CVE-2018-15961: Exploit for CVE-2018-15961, a unrestricted file upload vulnerability in Adobe ...]
  8. GitHub: https://github.com/byteofjoshua/CVE-2018-15961
    [CVE-2018-15961: CVE-2018-15961 — ᴀᴅᴏʙᴇ ᴄᴏʟᴅғᴜsɪᴏɴ (ʀᴄᴇ)]
  9. GitHub: https://github.com/cved-sources/cve-2018-15961
    [CVE-2018-15961: Cve-2018-15961]
  10. GitHub: https://github.com/vah13/CVE-2018-15961
    [CVE-2018-15961: Unrestricted file upload in Adobe ColdFusion]
  11. D2 Elliot: adobe_coldfusion_file_upload.html
    [Adobe ColdFusion File Upload]

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-2018-15961
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.7 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


This is the coldfusion_apsb18-33_file_upload_direct.nasl nessus plugin source code. This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#TRUSTED 6cd1b3c3436b151a038208470038113850ead1774f4407c440abdabc3fb7bea8c4788cb0845669af39534fc99f69f2ec7e90405363db540e9b67661e05d0b95ed7e7677802a50e147af7992bfc686fbc6a3d84c9bb18c8ee0dec7cb80f55b14eebfb2d0375f68a11192cc85c4fa1896e11f6a3b14cd0ba7e91d0e6ff121050cf44ca38d4fde8685915b33c08ade9f3999538a0f993a7716593160a7a52d52823d35d0794205653a70f355b3779a5f399031c046bd6a77d22c3509951920abc54dcad570078cdc6d9daa8a9550ced854934d42ce55f835054f4fed7bb01a9d6d2e2ea3e6bcd5c1beea9690a968cb9404b8f3a1182864d492ff5b759e36509ae9219d4ac3f26fb81f81592e65109effc20954691d76541bd7d91ba9ab04617a9ea7a27c94ad3e0122f711dd16e655fd830ea48a19be52d7f0eb150971721eacef1882ee916acc5afd8a992151ae9241e53389618eb40b1b1639965b1ba8bfcc84ec8cfbbd1fd68273a36dd1a6baff4c0347ccd6af4ccbb70e16c6e73fb8f0beaa60c5b21bacea76415787ce1f3d568a334cd4e1266d0ce542c3a4b199164e6289f16429b4b3579bb58999d533738bdd036619f28650b0d64bf69b12c60e84c9cd95ccb82561942dd013b645d21a86635ce32d0624c917686909d909b8c8b1ad5f851f7ee591bfec050a020d6035b12fe242c31768263e113f9fbd7c490a7092dcb
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(130263);
  script_version("1.11");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/01/24");

  script_cve_id("CVE-2018-15961");
  script_bugtraq_id(105314);
  script_xref(name:"EDB-ID", value:"45979");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961)");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains an application that is affected by an arbitrary file upload vulnerability.");
  script_set_attribute(attribute:"description", value:
"An arbitrary file upload vulnerability exists in Adobe ColdFusion due to insufficient validation in the filemanager
plugin. An unauthenticated, remote attacker can exploit this, via a specially crafted POST request, to upload arbitrary
files on the remote host.");
  script_set_attribute(attribute:"see_also", value:"https://helpx.adobe.com/security/products/coldfusion/apsb18-33.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Adobe ColdFusion 11 Update 15, 2016 Update 7, or 2018 Update 1 or later");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-15961");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Adobe ColdFusion File Upload");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Adobe ColdFusion CKEditor unrestricted file upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/09/25");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/03/01");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/10/25");

  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:adobe:coldfusion");
  script_end_attributes();

  script_category(ACT_MIXED_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("os_fingerprint.nasl", "coldfusion_detect.nasl");
  script_require_keys("installed_sw/ColdFusion");
  script_require_ports("Services/www", 80, 8500);

  exit(0);
}

include('audit.inc');
include('global_settings.inc');
include('install_func.inc');
include('misc_func.inc');
include('http.inc');
include('spad_log_func.inc');

##
# Sends a POST request with no data and determines, based on the status code, if target is vulnerable.
# 
# @return An array containing the vuln bool indicating whether the target was determined to be vulnerable
# and request, the last sent HTTP request
##
function send_empty_post()
{
  var vuln = false;
  var post_response = http_send_recv3(
    port            : port,
    method          : 'POST',
    item            : '/cf_scripts/scripts/ajax/ckeditor/plugins/filemanager/upload.cfm',
    data            : '',
    content_type    : 'application/json'
  );
  var request = http_last_sent_request();
  spad_log(message:'Attempted to determine vulnerability with:\n' + request);
  spad_log(message:'The response status code was:\n' + post_response[0]);

  if (!empty_or_null(post_response[0]) && '500 Internal Server Error' >< post_response[0])
    vuln = true;

  if (safe_checks() && !vuln)
    audit(AUDIT_LISTEN_NOT_VULN, app_name, port);

  return {'vuln' : vuln, 'request' : request};
}

##
# Attempts to upload a file to the target, and checks if it has succeeded
# returning the an array containing POST request if the upload is successful.
# 
# @return an array containing the POST request
##
function upload_file()
{
  # Generate a random pattern for the file contents to detect the file upload
  var pattern = rand_str(length:8, charset:'0123456789ABCDEF');
  var bound = 'nessus';
  var boundary = '--' + bound;
  var fname = SCRIPT_NAME + '-' + unixtime() + '.txt';

  var postdata =
    boundary + '\r\n' +
    'Content-Disposition: form-data; name="file"; filename="' + fname + '"\r\n' +
    'Content-Type: application/octet-stream\r\n\r\n' +
    pattern +
    '\n\r\n' +

    boundary + '\r\n' +
    'Content-Disposition: form-data; name="path"\r\n\r\n\n' +
    pattern +
    '\r\n' +
    boundary + '--' + '\r\n';

  http_send_recv3(method: "POST", port: port,
    item: '/cf_scripts/scripts/ajax/ckeditor/plugins/filemanager/upload.cfm',
    content_type: 'multipart/form-data; boundary=' + bound,
    data: postdata,
    add_headers:make_array('User-Agent', 'curl/7.47.0', 'Accept', '*/*', 'Expect', '100-continue'));

  var post_request = http_last_sent_request();
  spad_log(message:'Attempted to upload file with:\n' + post_request);

  var get_response = http_send_recv3(
    port            : port,
    method          : 'GET',
    item            : '/cf_scripts/scripts/ajax/ckeditor/plugins/filemanager/uploadedFiles/' + fname
  );

  if (empty_or_null(get_response[2]) || pattern >!< get_response[2])
    audit(AUDIT_LISTEN_NOT_VULN, app_name, port);

  var get_request = http_last_sent_request();
  spad_log(message:'Retrieved a matching file with:\n' + get_request);
  spad_log(message:'The contents of the retrieved file were:\n' + get_response[2]);

  return {'request': post_request};
}

#
# Main
#

app_name = 'ColdFusion';
get_install_count(app_name:app_name, exit_if_zero:TRUE);

port = get_http_port(default:80);

install = get_single_install(
  app_name : app_name,
  port     : port
);

result = {'vuln': false, 'request': ''};
# If not paranoid and safe_checks_enabled, audit as potentially vulnerable
if (report_paranoia < 2 && safe_checks())
  audit(AUDIT_POTENTIAL_VULN, app_name);
# If paranoid, try to determine vulnerability based on status codes
if (report_paranoia >= 2)
  result = send_empty_post();
# If safe_checks are disabled and first test was not vulnerable, try to upload a file
if (!result['vuln'] && !safe_checks())
  result = upload_file();


security_report_v4(
  port: port,
  severity: SECURITY_HOLE,
  generic: TRUE,
  request: make_list(result['request'])
);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/coldfusion_apsb18-33_file_upload_direct.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\coldfusion_apsb18-33_file_upload_direct.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/coldfusion_apsb18-33_file_upload_direct.nasl

Go back to menu.

How to Run


Here is how to run the Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Adobe ColdFusion File Upload (APSB18-33) (CVE-2018-15961) plugin ID 130263.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. 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 coldfusion_apsb18-33_file_upload_direct.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a coldfusion_apsb18-33_file_upload_direct.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - coldfusion_apsb18-33_file_upload_direct.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 coldfusion_apsb18-33_file_upload_direct.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 117480 - Adobe ColdFusion 11.x < 11u15 / 2016.x < 2016u7 / 2018.x < 2018u1 Multiple Vulnerabilities (APSB18-33)
  • 99731 - Adobe ColdFusion BlazeDS Java Object Deserialization RCE
  • 66404 - Adobe ColdFusion Multiple Vulnerabilities (APSA13-03)
  • 64689 - Adobe ColdFusion Authentication Bypass (APSB13-03)
  • 66408 - Adobe ColdFusion Authentication Bypass (APSB13-13) (intrusive check)
  • 39790 - Adobe ColdFusion FCKeditor 'CurrentFolder' File Upload
  • 48340 - Adobe ColdFusion 'locale' Parameter Directory Traversal
  • 42340 - Adobe ColdFusion <= 8.0.1 _logintowizard.cfm XSS
  • 66526 - Adobe ColdFusion Multiple Vulnerabilities (APSB13-03) (credentialed check)
  • 82780 - Adobe ColdFusion Unspecified XSS (APSB15-07) (credentialed check)
  • 93245 - Adobe ColdFusion XML External Entity (XXE) Injection Information Disclosure (APSB16-30)
  • 99669 - Adobe ColdFusion 10.x < 10u23 / 11.x < 11u12 / 2016.x < 2016u4 Multiple Vulnerabilities (APSB17-14)
  • 103194 - Adobe ColdFusion 11.x < 11u13 / 2016.x < 2016u5 Multiple Vulnerabilities (APSB17-30)
  • 109017 - Adobe ColdFusion 11.x < 11u14 / 2016.x < 2016u6 Multiple Vulnerabilities (APSB18-14)
  • 125880 - Adobe ColdFusion < 11.x < 11u19 / 2016.x < 2016u11 / 2018.x < 2018u4 Multiple Vulnerabilities (APSB19-27)
  • 148039 - Adobe ColdFusion 2016.x < 2016u17 / 2018.x < 2018u11 / 2021.x < 2021u1 Improper Input Validation RCE (APSB21-16)
  • 24278 - ColdFusion Web Server User-Agent HTTP Header Error Message XSS
  • 65127 - Adobe InDesign Server RunScript Arbitrary Command Execution
  • 41947 - Adobe RoboHelp Server Security Bypass (APSA09-05 / intrusive check)
  • 41946 - Adobe RoboHelp Server Security Bypass (APSA09-05)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file coldfusion_apsb18-33_file_upload_direct.nasl version 1.11. For more plugins, visit the Nessus Plugin Library.

Go back to menu.