PaperCut — 2 vulnerability checks
noctis ships 2 vulnerability checks for PaperCut, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
PaperCut MF/NG SetupCompleted Auth Bypass
| CVE | CVE-2023-27350 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/papercut/CVE-2023-27350.yaml |
Tests PaperCut MF/NG for the SetupCompleted authentication bypass. A benign, read-only GET of /app?service=page/SetupCompleted without any session cookie reaches the authenticated admin page on a vulnerable server, while a patched server redirects to the login form. Detection only — no settings are changed and the scripting/RCE chain is never exercised (QoD 75).
How noctis detects it
- HTTP(S) request
GET /app - Checks
fp_resp.bodyforPaperCut - HTTP(S) request
GET /app?service=page/SetupCompleted - Checks
sc_resp.bodyfor(?i)(Configuration Wizard|Setup Complete|admin-main|csrf)→ finding QoD 75: SetupCompleted admin page reachable without authentication (HTTP …, no login redirect) — CVE-2023-27350 auth bypass: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-27350
- https://www.zerodayinitiative.com/advisories/ZDI-23-233/
- https://www.papercut.com/kb/Main/PO-1216-and-PO-1219
Feed source — tests/vulnerabilities/papercut/CVE-2023-27350.yaml
# PaperCut MF/NG authentication bypass — CVE-2023-27350
#
# PaperCut's SetupCompleted page (/app?service=page/SetupCompleted) can be
# reached without authentication because the application treats a completed
# setup wizard as an already-authenticated admin context. An unauthenticated
# attacker reaches admin functionality (and, by chaining the built-in
# scripting interface, remote code execution). Actively exploited (CISA KEV).
#
# Affected: PaperCut MF/NG < 20.1.7, < 21.2.11, < 22.0.9. Fixed in those
# builds, which send unauthenticated requests for the SetupCompleted page back
# to the admin login form.
#
# Detection (safe, differential auth-bypass — NO exploitation):
# 1. GET /app → fingerprint PaperCut (gate only, no finding).
# 2. GET /app?service=page/SetupCompleted with NO session cookie → a
# vulnerable server returns the authenticated Setup-Completed admin page
# (200 + admin-page markers, no login redirect); a patched server sends a
# 302 to the login page / renders the login form instead.
# 3. The benign, read-only GET distinguishes vulnerable vs patched. No
# settings are changed, no user is created, the scripting/RCE step is
# never reached. QoD 75 (response analysis).
uid: 6df464df-69b2-4426-8cff-42fe3eb7aa21
name: "PaperCut MF/NG SetupCompleted Auth Bypass (CVE-2023-27350)"
description: |
Tests PaperCut MF/NG for the SetupCompleted authentication bypass. A benign,
read-only GET of /app?service=page/SetupCompleted without any session cookie
reaches the authenticated admin page on a vulnerable server, while a patched
server redirects to the login form. Detection only — no settings are changed
and the scripting/RCE chain is never exercised (QoD 75).
cves: [CVE-2023-27350]
cvss: 9.8
severity: critical
confidence_base: 0.30
tags: [papercut, auth-bypass, setup-completed, kev]
category: auth-bypass
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-27350"
- "https://www.zerodayinitiative.com/advisories/ZDI-23-233/"
- "https://www.papercut.com/kb/Main/PO-1216-and-PO-1219"
steps:
- id: init-papercut
action: set_var
var_name: is_papercut
var_value: false
# ── Step 1: fingerprint PaperCut (gate only) ─────────────────────────────
- id: fingerprint
action: http_request
method: GET
path: "/app"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: fp_resp
- id: fingerprint-gate
action: match
source: fp_resp.body
pattern: "PaperCut"
condition: "fp_resp.status == 200"
on_match:
set_vars:
is_papercut: true
# ── Step 2: reach SetupCompleted admin page WITHOUT auth (read-only) ─────
- id: setup-completed
action: http_request
method: GET
path: "/app?service=page/SetupCompleted"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: sc_resp
condition: "is_papercut == true"
# ── Step 3: differential detection ───────────────────────────────────────
# Vulnerable: the SetupCompleted admin page is served (200) and carries
# admin-page markers while NOT bouncing to the login form.
# Patched: the request is redirected (302) to the login page, or the login
# form is rendered instead, so neither branch fires.
- id: confirm
action: match
source: sc_resp.body
pattern: "(?i)(Configuration Wizard|Setup Complete|admin-main|csrf)"
condition: "is_papercut == true && sc_resp.status == 200 && !ereg(\"(service=page/Login|j_username|loginForm)\", sc_resp.body, true)"
on_match:
finding:
confidence_delta: 0.50
qod: 75
evidence: "SetupCompleted admin page reachable without authentication (HTTP {{sc_resp.status}}, no login redirect) — CVE-2023-27350 auth bypass: {{sc_resp.body}}"
stop: truePaperCut NG/MF Auth Bypass
| CVE | CVE-2023-27351 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, script, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/papercut/CVE-2023-27351.yaml |
Tests PaperCut NG/MF for the SecurityRequestFilter authentication bypass. Calls the read-only getExportedUser REST function twice: without the bypass (must be refused) and with ";/keepalive" appended, for a random user name that does not exist. A vulnerable server runs the privileged call without authentication and returns a Java-serialized result; a patched server refuses both. Nothing is created or changed on the target.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET /app - Checks
fp_resp.bodyforPaperCut - HTTP(S) request
POST /rpc/api/rest/master/user/getExportedUserwith a crafted body - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /rpc/api/rest/master/user/getExportedUser;/keepalivewith a crafted body - Checks
bp_resp.bodyforrO0A→ finding QoD 75: Auth bypass confirmed — POST getExportedUser was refused (HTTP …) but getExportedUser;/keepalive ran without authentication and returned a …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-27351
- https://www.zerodayinitiative.com/advisories/ZDI-23-232/
- https://www.papercut.com/kb/Main/PO-1216-and-PO-1219
Feed source — tests/vulnerabilities/papercut/CVE-2023-27351.yaml
# PaperCut NG/MF authentication bypass — CVE-2023-27351
#
# PaperCut's SecurityRequestFilter has a logic flaw: appending ";/keepalive"
# to a REST API path makes the filter match an allow-listed path during
# normalisation, so the request reaches a protected endpoint without auth.
# An unauthenticated attacker can call privileged REST endpoints (user
# creation / export). Actively exploited by ransomware operators (KEV).
#
# Affected: PaperCut NG/MF <= 22.0.5 (Build 63914), fixed in 22.0.6.
#
# Detection (read-only, differential — nothing is created or changed):
# 1. GET /app → fingerprint PaperCut (gate only, no finding).
# 2. Control: POST getExportedUser WITHOUT the suffix → must NOT return a
# serialized RPC result (401/403/redirect). Rules out a server that
# answers 200 to anything.
# 3. POST getExportedUser;/keepalive for a random user name that does not
# exist → 200 (or 500) + "rO0A" (base64 of the Java
# serialization magic: the RPC layer serialized the method's result) = the
# filter was bypassed and the privileged read-only RPC ran. QoD 75.
# A patched server answers 401.
#
# Earlier versions of this feed called createInternalUser;/keepalive with
# `noctis_probe` / a fixed public password, leaving that account on every
# vulnerable host (issue #2418). The lookup of a non-existent user returns no
# real account data, so nothing sensitive lands in the finding either.
uid: 4c2be02b-579d-4906-bbad-f1a139bd5eed
name: "PaperCut NG/MF Auth Bypass (CVE-2023-27351)"
description: |
Tests PaperCut NG/MF for the SecurityRequestFilter authentication bypass.
Calls the read-only getExportedUser REST function twice: without the bypass
(must be refused) and with ";/keepalive" appended, for a random user name that
does not exist. A vulnerable server runs the privileged call without
authentication and returns a Java-serialized result; a patched server refuses
both. Nothing is created or changed on the target.
cves: [CVE-2023-27351]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [papercut, auth-bypass, rest-api, kev]
category: auth-bypass
services: [http, https]
author: noctis
version: "1.1.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-27351"
- "https://www.zerodayinitiative.com/advisories/ZDI-23-232/"
- "https://www.papercut.com/kb/Main/PO-1216-and-PO-1219"
steps:
- id: init-papercut
action: set_var
var_name: is_papercut
var_value: false
- id: init-ctl
action: set_var
var_name: ctl_refused
var_value: false
- id: rand
action: script
code: |
#{ user: "noctis-" + rand_str(10) }
store_as: rv
# ── Step 1: fingerprint PaperCut (gate only) ─────────────────────────────
- id: fingerprint
action: http_request
method: GET
path: "/app"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: fp_resp
- id: fingerprint-gate
action: match
source: fp_resp.body
pattern: "PaperCut"
condition: "fp_resp.status == 200"
on_match:
set_vars:
is_papercut: true
# ── Step 2: control — the same RPC without the bypass must be refused ────
- id: control
action: http_request
method: POST
path: "/rpc/api/rest/master/user/getExportedUser"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/json"
body: '{"username":["{{rv.user}}"]}'
store_as: ctl_resp
condition: "is_papercut == true"
- id: control-gate
action: script
code: |
// Refused = anything but a serialized RPC result (401/403, a redirect
// to the login page, an error page…).
!(ctl_resp.status == 200 && type_of(ctl_resp.body) == "string" && ctl_resp.body.contains("rO0A"))
store_as: ctl_refused
condition: "is_papercut == true && type_of(ctl_resp) == \"map\""
# ── Step 3: read-only RPC through ;/keepalive ────────────────────────────
- id: bypass
action: http_request
method: POST
path: "/rpc/api/rest/master/user/getExportedUser;/keepalive"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/json"
body: '{"username":["{{rv.user}}"]}'
store_as: bp_resp
condition: "ctl_refused == true"
- id: confirm
action: match
source: bp_resp.body
# rO0A = base64 of the Java serialization magic (\xac\xed\x00\x05)
pattern: "rO0A"
# 200 (serialized result) or 500 (serialized exception for the unknown
# user): either way the RPC ran past the filter.
condition: "ctl_refused == true && (bp_resp.status == 200 || bp_resp.status == 500)"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "Auth bypass confirmed — POST getExportedUser was refused (HTTP {{ctl_resp.status}}) but getExportedUser;/keepalive ran without authentication and returned a Java-serialized result (HTTP {{bp_resp.status}}) for a non-existent user name"
stop: true