CVE-2021-3199

CRITICAL(9.8)KEVElevated Risk

ONLYOFFICE Docs Server Path Traversal Vulnerability

Description

CVE-2021-3199 is a critical path traversal vulnerability with remote code execution in ONLYOFFICE Document Server before 5.6.3. When JWT is in use, a /.. sequence in an image upload parameter at the /upload endpoint escapes the intended upload directory, so an unauthenticated remote attacker can place a file anywhere the service can write — and from there reach code execution on the server. Because ONLYOFFICE Document Server renders and edits documents on behalf of a whole organization, often integrated into Nextcloud, ownCloud or a corporate portal, compromise of the server exposes the documents of every connected user. CISA has added CVE-2021-3199 to the Known Exploited Vulnerabilities catalog, its EPSS score of 20.1% places it in the 97th percentile, and its remediation deadline of October 11, 2026 has already passed.

KEV Information

Vendor
ONLYOFFICE
Product
Docs
Date Added
October 8, 2026
Due Date
October 11, 2026
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.

CVSS Score

Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in Calculator
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
Exploitability Score
3.9
Impact Score
5.9

CWEs

Affected Products

VendorProductVersion
onlyofficedocument server< 5.6.3

Multiple CVSS Assessments

Source: [email protected](Primary)
9.8
CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Source: 134c704f-9b21-4f2e-91b3-4a467353bcc0(Secondary)
9.8
CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References

Weakness Type

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Path traversal occurs when software constructs a file path from external input and does not neutralize sequences such as .. that resolve the path outside the restricted parent directory. In ONLYOFFICE Document Server, an image upload parameter supplied to /upload is used to build the destination path without that neutralization, so a /.. sequence directs the write out of the upload area and into a location chosen by the attacker.

Learn more: CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Impact Analysis

CVE-2021-3199 has a CVSS 3.1 base score of 9.8 (Critical) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Attack Vector (Network), Privileges Required (None), User Interaction (None): an HTTP upload request is the entire attack — no account, no token the attacker has to steal, and no user who has to open anything. Attack Complexity (Low): the traversal sequence is deterministic and needs no timing or memory manipulation. Confidentiality, Integrity and Availability (all High): an arbitrary file write that leads to code execution gives the attacker the privileges of the Document Server process, which means reading the documents being processed, modifying content that users then download as authentic, and stopping the service. The deployment context compounds this: Document Server is usually integrated with a file-sharing platform and holds the secrets of that integration, so a compromise reaches the connected storage as well. With an EPSS score of 20.1% in the 97th percentile, public proof-of-concept code available, and the KEV deadline already passed, any instance below 5.6.3 should be treated as compromised rather than merely vulnerable.

Exploit Maturity

Public proof-of-concept exploits for CVE-2021-3199 are available. The reference set includes two published PoC scripts targeting exactly this upload path — poc_uploadImageFile.py in moehw/poc_exploits and a mirror in nola-milkin/poc_exploits — so no exploit development is required. CISA has added the vulnerability to the Known Exploited Vulnerabilities catalog, confirming exploitation in the wild, and the remediation deadline of October 11, 2026 has already passed; the entry does not flag ransomware usage. The EPSS score of 20.1% places CVE-2021-3199 in the 97th percentile, among the vulnerabilities most likely to see exploitation activity, which is what one would expect from an unauthenticated remote code execution flaw with ready-made scripts in a product that is routinely published on the internet as part of a document collaboration stack. Patch and then investigate; do not assume that an instance exposed since 2021 was overlooked.

Remediation

  1. Carry out the action CISA requires, immediately. Apply mitigations in accordance with ONLYOFFICE's instructions, comply with CISA's BOD 26-04 "Prioritizing Security Updates Based on Risk" guidance and the "Forensics Triage Requirements", and discontinue use of the product if mitigations are unavailable. The KEV remediation deadline of October 11, 2026 has already passed.
  2. Upgrade ONLYOFFICE Document Server to 5.6.3 or later — and, since 5.6.3 dates from 2021, preferably to a current release. The fix is recorded in the Document Server changelog for 5.6.3. Container deployments need a new image, not a restart.
  3. Take the server off the public internet until it is patched. Because the vulnerability is unauthenticated, exposure is the entire precondition: restrict access to the Document Server to the application servers that integrate with it, and place it behind a reverse proxy that does not forward /upload from untrusted sources.
  4. Investigate for prior compromise and rotate integration secrets. Look for files written outside the upload directory, unexpected scripts or binaries in the service's working directories, new scheduled tasks and outbound connections, and review web logs for upload requests whose parameters contain .. sequences. Rotate the JWT secret shared with Nextcloud, ownCloud or your portal, along with any storage credentials the server holds.
  5. Harden path handling in general. Resolve every externally derived path with a canonicalization function and verify that the result still lies inside the permitted directory before writing; never build a storage path from a client-supplied name, generate it server-side instead, and keep upload directories on a mount from which the application cannot execute code.

Technical Details

The /upload endpoint of ONLYOFFICE Document Server accepts an image upload whose parameter contributes to the destination path. That parameter is not neutralized against relative traversal, so a /.. sequence makes the resolved path leave the upload directory — the CWE-22 mechanism. The consequence described in the advisory goes beyond file placement: because the attacker chooses both the location and the contents of the written file, the write can be aimed at a path from which the server subsequently executes or interprets the content, producing remote code execution. NVD notes the condition "when JWT is used", meaning the vulnerability manifests in the JWT-enabled configuration, which is the recommended and common deployment mode rather than an exotic setting. The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H reflects a remote, trivially repeatable, unauthenticated attack without user interaction and with complete impact across all three dimensions, within an unchanged scope since the attacker gains the authority of the Document Server process itself.

Frequently Asked Questions

Is CVE-2021-3199 being actively exploited?

Yes. CISA has added CVE-2021-3199 to the Known Exploited Vulnerabilities catalog, and the remediation deadline of October 11, 2026 has already passed. Public proof-of-concept exploit scripts are available on GitHub, and the EPSS score of 20.1% places the vulnerability in the 97th percentile for exploitation likelihood. Use in ransomware campaigns is not recorded in the KEV entry.

What products are affected by CVE-2021-3199?

CVE-2021-3199 affects ONLYOFFICE Document Server in all versions before 5.6.3, in deployments where JWT is used. Document Server is the component that renders and edits documents, typically integrated into platforms such as Nextcloud or ownCloud, so an affected instance may be running behind a product you think of by a different name.

How do I fix CVE-2021-3199?

Upgrade ONLYOFFICE Document Server to 5.6.3 or later, and preferably to a currently supported release, since 5.6.3 is from 2021. Until that is done, make the server unreachable from untrusted networks, because exploitation requires no authentication. Afterwards, check for files written outside the upload directory and rotate the JWT secret and storage credentials shared with the integrating platform.

How severe is CVE-2021-3199?

CVE-2021-3199 is rated Critical with a CVSS 3.1 base score of 9.8: unauthenticated remote attackers can write arbitrary files and achieve code execution with no user interaction, fully compromising confidentiality, integrity and availability. Its EPSS score of 20.1% is in the 97th percentile. Because the server processes documents for an entire organization and holds the secrets of its platform integration, the practical impact extends beyond the host itself.

CVSS Score

9.8
CRITICAL(9.8)

EPSS Score

EPSS Score30.24%
EPSS Percentile98.3%

Dates

PublishedJanuary 26, 2021
Last ModifiedOctober 9, 2026
StatusAnalyzed
CVSS Versionv3.1

Need Help With Vulnerability Management?

Our security experts can help you prioritize and remediate vulnerabilities effectively.