CVE-2021-25830

9.8 CRITICAL

📋 TL;DR

CVE-2021-25830 is a critical remote code execution vulnerability in ONLYOFFICE DocumentServer. Attackers can exploit improper file extension handling during DOCT to DOCX conversion to execute arbitrary code on affected servers. Organizations running vulnerable versions of ONLYOFFICE DocumentServer are at risk.

💻 Affected Systems

Products:
  • ONLYOFFICE DocumentServer
Versions: v4.2.0.236 through v5.6.4.13
Operating Systems: Linux, Windows
Default Config Vulnerable: ⚠️ Yes
Notes: All installations within the affected version range are vulnerable by default. The vulnerability is in the core module used by DocumentServer.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attackers to execute arbitrary code with DocumentServer privileges, potentially leading to data theft, lateral movement, or ransomware deployment.

🟠

Likely Case

Remote code execution leading to document server compromise, data exfiltration, and potential access to connected systems.

🟢

If Mitigated

Limited impact with proper network segmentation and minimal privileges, potentially only affecting the DocumentServer instance.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires chaining multiple bugs but has been publicly documented. Attackers need to trigger file conversion functionality.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v5.6.4.14 and later

Vendor Advisory: https://github.com/ONLYOFFICE/DocumentServer/releases

Restart Required: Yes

Instructions:

1. Backup your DocumentServer configuration and data. 2. Update ONLYOFFICE DocumentServer to version 5.6.4.14 or later. 3. Restart the DocumentServer service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Disable DOCT file conversion

all

Temporarily disable conversion of DOCT files to DOCX format to block the attack vector.

# Modify DocumentServer configuration to restrict DOCT file processing
# Configuration changes depend on your specific deployment

Network segmentation

linux

Isolate DocumentServer from critical systems and restrict external access.

# Use firewall rules to limit DocumentServer access
iptables -A INPUT -p tcp --dport 80 -s trusted_networks -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -s trusted_networks -j ACCEPT

🧯 If You Can't Patch

  • Implement strict network access controls to limit DocumentServer exposure
  • Monitor for suspicious file conversion requests and unusual process execution

🔍 How to Verify

Check if Vulnerable:

Check the DocumentServer version. If it's between v4.2.0.236 and v5.6.4.13 inclusive, it's vulnerable.

Check Version:

docker exec onlyoffice-documentserver cat /etc/onlyoffice/documentserver/VERSION 2>/dev/null || grep -i version /var/www/onlyoffice/documentserver/VERSION 2>/dev/null

Verify Fix Applied:

Confirm DocumentServer version is 5.6.4.14 or later and test that DOCT to DOCX conversion still works for legitimate files.

📡 Detection & Monitoring

Log Indicators:

  • Unusual DOCT file conversion requests
  • Suspicious process execution from DocumentServer context
  • Error logs related to file parsing failures

Network Indicators:

  • HTTP POST requests to conversion endpoints with DOCT files
  • Outbound connections from DocumentServer to unexpected destinations

SIEM Query:

source="onlyoffice" AND (url="*/converter*" OR process="*python*" OR process="*bash*")

🔗 References

📤 Share & Export