Atlassian Crowd — 1 vulnerability check

noctis ships 1 vulnerability check for Atlassian Crowd, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Atlassian Crowd pdkinstall Unauthenticated Plugin Install RCE

CVECVE-2019-11580
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/atlassian-crowd/CVE-2019-11580.yaml

Tests Atlassian Crowd / Crowd Data Center for the pdkinstall development plugin being enabled, which exposes the plugin installer at /crowd/admin/uploadplugin.action without authentication and so allows remote code execution. The check sends a GET and then a multipart POST that carries no plugin file to that URL (default /crowd context, then a root deployment). The finding requires both error replies of the pdkinstall install handler: HTTP 400 "Requires post" to the GET and HTTP 400 "Missing plugin file" to the POST. Nothing is uploaded or installed. A fixed Crowd answers 404 or redirects to the login page.

How noctis detects it

  1. HTTP(S) request GET {{crowd_ctx}}/admin/uploadplugin.action
  2. HTTP(S) request POST {{crowd_ctx}}/admin/uploadplugin.action with a crafted body
  3. Checks post_resp.body for Missing plugin file → finding QoD 75: Atlassian Crowd pdkinstall Unauthenticated Plugin Install RCE (CVE-2019-11580)

References:

Feed source — tests/vulnerabilities/atlassian-crowd/CVE-2019-11580.yaml
# Atlassian Crowd / Crowd Data Center — pdkinstall unauthenticated RCE (CVE-2019-11580)
#
# Atlassian Crowd ships with the `pdkinstall` development plugin, which in
# affected versions is left ENABLED in production. With it enabled, the plugin
# management endpoint (/crowd/admin/uploadplugin.action — the pdkinstall
# install handler) is reachable WITHOUT authentication, letting an unauthenticated
# attacker install an arbitrary (OSGi) plugin and achieve remote code execution.
#
# Affected: Atlassian Crowd 2.1.0 before 3.0.5, 3.1.x before 3.1.6, 3.2.x before
#   3.2.8, 3.3.x before 3.3.5, 3.4.x before 3.4.4 (and Crowd Data Center).
#
# Detection (safe, non-destructive — nothing is uploaded or installed):
#   The pdkinstall servlet filter (com.atlassian.pdkinstall.PdkInstallFilter,
#   bundled as pdkinstall-plugin-0.4.jar in the affected releases, absent from
#   3.4.4) sits in front of /admin/uploadplugin.action and answers before any
#   authentication. Its two cheapest error paths are used as the proof:
#     - a GET gets `sendError(400, "Requires post")`;
#     - a multipart POST that carries no `file_*` part gets
#       `sendError(400, "Missing plugin file")` — no temp file is written and the
#       plugin installer is never called.
#   Tomcat's error report prints both messages; each must appear only in its
#   own reply, so a page carrying both strings everywhere does not match.
#   A fixed or never-affected Crowd
#   answers the same URL with 404 "There is no Action mapped for action name
#   uploadplugin." (seen on real 3.4.3 before setup and on 3.4.4, which no
#   longer ships the plugin) or a login redirect. Neither message is part of the
#   requests, so an echo server or a catch-all 200 cannot match. Both the
#   default /crowd context and a root deployment are tried. QoD 75: the
#   unauthenticated install handler itself is reached; actually installing a
#   plugin would leave code on the target, so it is not attempted.
#   (Issue #2343: the earlier version required a mock-only marker string.)
uid: aaceb32d-0af8-4649-ac6f-897865af464f
name: "Atlassian Crowd pdkinstall Unauthenticated Plugin Install RCE (CVE-2019-11580)"
description: |
  Tests Atlassian Crowd / Crowd Data Center for the pdkinstall development
  plugin being enabled, which exposes the plugin installer at
  /crowd/admin/uploadplugin.action without authentication and so allows remote
  code execution. The check sends a GET and then a multipart POST that carries
  no plugin file to that URL (default /crowd context, then a root deployment).
  The finding requires both error replies of the pdkinstall install handler:
  HTTP 400 "Requires post" to the GET and HTTP 400 "Missing plugin file" to the
  POST. Nothing is uploaded or installed. A fixed Crowd answers 404 or redirects
  to the login page.
cves: [CVE-2019-11580]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.25
tags: [atlassian, crowd, pdkinstall, rce, unauthenticated, kev]
services: [http, https]
author: noctis
version: "1.1.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2019-11580"
  - "https://github.com/jas502n/CVE-2019-11580"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2019/CVE-2019-11580.yaml"
  - "https://www.rapid7.com/db/?q=CVE-2019-11580"

steps:
  # One pass per context path: the default /crowd context, then a root
  # deployment. Both stored results are pre-initialised every pass so that a
  # failed request never leaves them undefined (or holding the previous pass).
  - id: init-get-resp
    action: set_var
    var_name: get_resp
    var_value: {status: 0, body: ""}
    loop:
      over: ["/crowd", ""]
      var: crowd_ctx

  - id: init-post-resp
    action: set_var
    var_name: post_resp
    var_value: {status: 0, body: ""}

  # The pdkinstall filter rejects any non-POST with sendError(400, "Requires post").
  - id: pdkinstall-get
    action: http_request
    method: GET
    path: "{{crowd_ctx}}/admin/uploadplugin.action"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: get_resp

  # Only when the GET already looks like the filter: a multipart POST with one
  # plain form field and no `file_*` part. The filter finds no plugin file and
  # answers sendError(400, "Missing plugin file") — nothing is written to disk
  # and the plugin installer is not called. Keep it multipart: a non-multipart
  # POST makes the real filter build a temp jar and call the plugin installer.
  - id: pdkinstall-post
    action: http_request
    condition: "get_resp.status == 400 && stridx(get_resp.body, \"Requires post\") >= 0"
    method: POST
    path: "{{crowd_ctx}}/admin/uploadplugin.action"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "multipart/form-data; boundary=----noctisf15fe87e95a7"
      Accept-Encoding: "identity"
    body: "------noctisf15fe87e95a7\r\nContent-Disposition: form-data; name=\"noctis_probe\"\r\n\r\nno-plugin\r\n------noctisf15fe87e95a7--\r\n"
    store_as: post_resp

  - id: pdkinstall-match
    action: match
    condition: "get_resp.status == 400 && post_resp.status == 400 && stridx(get_resp.body, \"Requires post\") >= 0 && stridx(get_resp.body, \"Missing plugin file\") < 0 && stridx(post_resp.body, \"Requires post\") < 0"
    source: post_resp.body
    pattern: "Missing plugin file"
    on_match:
      finding:
        title: "Atlassian Crowd pdkinstall Unauthenticated Plugin Install RCE (CVE-2019-11580)"
        description: "The pdkinstall development plugin is enabled: its plugin install handler at {{crowd_ctx}}/admin/uploadplugin.action answered an unauthenticated GET with 400 \"Requires post\" and a multipart POST without a plugin file with 400 \"Missing plugin file\". An unauthenticated attacker can upload and enable an arbitrary plugin there and execute code (CVE-2019-11580)."
        remediation: "Upgrade Atlassian Crowd / Crowd Data Center to a fixed version (3.0.5, 3.1.6, 3.2.8, 3.3.5, 3.4.4 or later), or remove the pdkinstall plugin (pdkinstall-plugin-*.jar) from the bundled plugins and restart Crowd."
        confidence_delta: 0.65
        qod: 75
        evidence: "GET {{crowd_ctx}}/admin/uploadplugin.action -> HTTP {{get_resp.status}} (Requires post); POST without a plugin file -> HTTP {{post_resp.status}} (Missing plugin file)"
      stop: true

View these feeds on GitHub