Collabora Online Built-in CODE Server (richdocumentscode) Proxy OS Command Injection and Remote Code Execution (RCE) Vulnerability (CVE-2025-66208)
Executive & SecOps Summary
SECOPS ASSESSMENTNextcloud deployments utilizing the Collabora Online - Built-in CODE Server (richdocumentscode) app prior to version 25.04.702
Unauthenticated attackers can exploit a configuration-dependent OS Command Injection vulnerability via proxy.php and an intermediate reverse proxy to achieve Remote Code Execution (RCE)
Immediately upgrade the richdocumentscode application to version 25.04.702 or later, and restrict external access to the proxy endpoint in the interim
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Apply Official Security Patch
Immediately upgrade the richdocumentscode application to version 25.04.702 or later via the Nextcloud App Store or command-line interface.
Upgrade via Nextcloud CLI (occ):
sudo -u www-data php occ app:update richdocumentscode2. Temporary Mitigation Measures
If an immediate upgrade is not feasible, implement the following workarounds:
- Web Application Firewall (WAF) Rules:
Deploy rules to inspect and block requests targeting proxy.php that contain shell metacharacters (e.g., ;, &, |, ` `, $()`).
- Reverse Proxy Access Control:
Restrict external access to the proxy.php endpoint using your web server configuration (Nginx/Apache).
# Nginx Example: Restrict access to proxy.php
location ~* /apps/richdocumentscode/proxy.php {
allow 10.0.0.0/8; # Replace with trusted internal network
deny all;
fastcgi_pass php-handler;
}Block Exploits Instantly with Managed Virtual Patching Rules
Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.
Technical Root Cause & Exploitation Mechanics
This vulnerability (CVE-2025-66208) is a critical OS Command Injection (CWE-78) vulnerability residing in the proxy mechanism of the richdocumentscode application, which serves as the built-in Collabora Online server for Nextcloud.
Root Cause & Attack Vector
- Improper Input Sanitization: The
proxy.phpcomponent inrichdocumentscodeforwards requests to the internal CODE server. It fails to properly sanitize or escape user-supplied inputs before passing them to system shell execution contexts. - Reverse Proxy Exploitation: Attackers can leverage intermediate reverse proxies to manipulate headers or request parameters, forcing
proxy.phpto process malicious payloads. - Impact: Since the vulnerability requires no privileges and can be exploited remotely (AV:N/AC:L/PR:N/UI:N), successful exploitation grants the attacker arbitrary command execution capabilities under the context of the web server user (e.g.,
www-data).
Official Vendor Advisories & References
Collabora Online - Built-in CODE Server (richdocumentscode) provides a built-in server with all of the document editing features of Collabora Online. In versions prior to 25.04.702, Collabora Online has a Configuration-Dependent RCE (OS Command Injection) in richdocumentscode proxy. Users of Nextcloud with Collabora Online - Built-in CODE Server app can be vulnerable to attack via proxy.php and an intermediate reverse proxy. This vulnerability is fixed in 25.04.702.
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.