CVE DatabaseCVE-2021-3199
한국어 권고문 →
CVE-2021-31999.8/CRITICALCISA KEVCWE-22CWE-22

ONLYOFFICE Document Server Remote Code Execution (RCE) Advisory (CVE-2021-3199)

Affected Vendors
ONLYOFFICE
Affected Components
Document Server
Published Date
2021-01-26

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

ONLYOFFICE Document Server versions prior to 5.6.3 (when JWT is enabled)

Impact

Attackers can achieve Remote Code Execution (RCE) by uploading malicious files to arbitrary directories.

Mitigation

Immediately update ONLYOFFICE Document Server to version 5.6.3 or later.

Affected Products & Version Scope

All ONLYOFFICE Document Server versions before 5.6.3 are affected, specifically in deployments where JWT is utilized for session security.

Remediation & Live Workaround Commands

PATCH & WORKAROUND

The primary remediation is to upgrade to version 5.6.3 or higher.

1. Update via Docker

bash
docker-compose pull
docker-compose up -d

2. WAF Implementation

Deploy Web Application Firewall (WAF) rules to inspect and block requests containing directory traversal patterns (../) in multipart/form-data upload fields.

3. Filesystem Hardening

Ensure that the directory where uploaded files are stored is mounted with the noexec flag or configured at the web server level to prevent script execution.

Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Immediately verify your ONLYOFFICE Document Server version and prioritize upgrading to 5.6.3 or later to mitigate the risk of active exploitation.

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.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

CVE-2021-3199 is a critical Directory Traversal (CWE-22) vulnerability located in the /upload endpoint of ONLYOFFICE Document Server. When JWT authentication is in use, the server fails to properly sanitize image upload parameters. An attacker can exploit this by injecting ../ sequences into the filename, allowing them to write arbitrary files outside the designated upload directory. This typically leads to the placement of a web shell in a web-accessible directory, resulting in full Remote Code Execution (RCE). This vulnerability is included in the CISA KEV catalog, indicating active exploitation in the wild, and carries a high EPSS score of 0.94.

Official Vendor Advisories & References

SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
CVE-2021-3199: ONLYOFFICE Document Server Remote Code Execution (RCE) Advisory (CVE-2021-3199) (CVSS 9.8) | CVE Pulse