---
id: "CVE-2021-3199"
kind: "vulnerability"
aliases: ["CVE-2021-3199"]
title: "Directory traversal with remote code execution can occur in /upload in ONLYOFFICE Document Server before 5.6.3, when\u2026"
severity: "critical"
cvss: 9.8
epss: null
exploited: true
status: "open"
category: "package"
products: [{"name": "ONLYOFFICE Docs", "fixed": [], "affected": "", "ecosystem": "vendor"}, {"name": "ONLYOFFICE Document Server", "fixed": ["5.6.3"], "affected": "< 5.6.3", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["document-server", "exploited", "onlyoffice", "package", "path-traversal", "rce", "self-hosted"]
not_affected_if: ["jwt-disabled", "managed-hosting", "version-5.6.3-or-later"]
published_at: "2021-01-26T18:16:28+00:00"
first_seen_at: "2026-10-23T19:11:50+00:00"
updated_at: "2026-10-23T23:44:52+00:00"
sources: [{"source": "kev", "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2021-3199", "first_seen_at": "2026-10-23T19:11:50+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-10-23T21:35:15+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3199", "first_seen_at": "2026-10-23T23:44:52+00:00"}]
---

# Directory traversal with remote code execution can occur in /upload in ONLYOFFICE Document Server before 5.6.3, when…

Path traversal in ONLYOFFICE Document Server's /upload image handling (a /.. sequence in an image upload parameter) leads to remote code execution when JWT is enabled. NVD scores it 9.8 (network, no privileges, no user interaction). It is in the CISA KEV catalog. The fix shipped in 5.6.3, released in 2020, so any current install should already be past it. Only very old or unmaintained instances are at risk.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:ONLYOFFICE Docs affected ? fixed ?
- vendor:ONLYOFFICE Document Server affected < 5.6.3 fixed 5.6.3

## How to check

Check the Document Server version: open http://<host>/ (welcome page), or run 'curl http://<host>/hosting/discovery', or on Linux run 'dpkg -l onlyoffice-documentserver' or 'rpm -q onlyoffice-documentserver'. For Docker, run 'docker inspect' on the image tag. Anything below 5.6.3 is vulnerable. The advisory says 'when JWT is used'; JWT settings are in local.json/default.json under services.CoAuthoring.token. I did not verify whether the flaw is reachable with JWT disabled.

## Fix

Upgrade ONLYOFFICE Document Server / Docs to 5.6.3 or later. Current releases are far past this. Keep JWT enabled with a strong secret, and do not expose the Document Server to the internet unless needed.

## Timeline

- 2026-10-23T19:11:50+00:00 kev https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2021-3199
- 2026-10-23T21:35:15+00:00 analyst — Fixed in Document Server 5.6.3 per the vendor changelog ('Fix Path Traversal vulnerability via image upload params', Bug #46113) and the NVD/OSV range (< 5.6.3). No standalone ONLYOFFICE security bulletin found. PoC listed in OSV references (moehw/poc_exploits, CVE-2021-3199/poc_uploadImageFile.py) but I could not open it. KEV exploitation is from the CISA catalog. The Flax Typhoon attribution comes only from a secondary blog and is unconfirmed. X posts only restate the advisory.
- 2026-10-23T23:44:52+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2021-3199

## Documents

- [advisory] OSV CVE-2021-3199 (NVD record: before 5.6.3, JWT, CVSS 9.8) https://osv.dev/vulnerability/CVE-2021-3199
- [fix] ONLYOFFICE DocumentServer changelog (5.6.3: path traversal via image upload params fixed) https://github.com/ONLYOFFICE/DocumentServer/blob/903fe5ab7a275bd69c3c3346af2d21cf87ebeabf/CHANGELOG.md

## From the sources

ONLYOFFICE Docs contains a path traversal vulnerability that can occur when JWT is used, via a /.. sequence in an image upload parameter and could allow for remote code execution.

CISA required action: Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
