ONLYOFFICE Docs: One Signing Key and Raw XML Turned a Viewer Into Root (2026)

Rapid7 chained five ONLYOFFICE Docs flaws from view-only access to root in the official container. What it reported, the upgrade advice, and the code patterns behind it, with illustrative fixes.

On 16 November 2026 (per Rapid7’s timeline) Rapid7 published research by Jonah Burgess on five vulnerabilities in ONLYOFFICE Docs. Rapid7 says an attacker with view-only access to a document can chain them to run operating system commands as root inside the official DocumentServer container. Per Rapid7’s disclosure timeline, ONLYOFFICE confirmed on 23 October 2026 that all five were fixed in Document Server 10.0. This article summarizes the report, then uses its code to show three bug patterns worth hunting for in your own services. The fixes we show are illustrations, not ONLYOFFICE’s code.

What Rapid7 reports

CVEFindingCVSS (per Rapid7’s table)
CVE-2026-113627DocBuilder native file read and session JWT forgery7.1 High
CVE-2026-110385DocBuilder SaveFile conversion parameter injection and code execution8.7 High
CVE-2026-97727Complete-save format path traversal and arbitrary file write6.5 Medium
CVE-2026-113630Root-helper command injection7.8 High
CVE-2026-113631View-only export of non-rendered document data6.5 Medium

The scores are as listed by Rapid7. NVD shows 8.7 for CVE-2026-110385 as a CVSS v4.0 score from the CNA (MITRE), and 7.8 and 6.5 for CVE-2026-113630 and CVE-2026-113631 as v3.1 scores from Rapid7; Rapid7 links CVSS 3.1 vectors for CVE-2026-113627 (7.1) and CVE-2026-97727 (6.5). As of 2026-11-17 we found no NVD or cve.org record for CVE-2026-113627 or CVE-2026-97727, so those IDs are as given by Rapid7. CVE-2026-113630 needs command execution as the ds account first (local vector).

Rapid7 tested the official onlyoffice/documentserver:9.4.0 image (package 9.4.0-129) and states that exploitation was demonstrated only there; the broader affected range is unknown. The MITRE CVE record for CVE-2026-110385 says versions before 10.0.0, which Rapid7 did not test. Rapid7 also says that with WOPI enabled and an attacker-controlled source permitted by the IP filter, the chain requires no pre-existing DocumentServer account or token. The complete-save traversal needs filesystem storage, and the token-forgery step relied on the signing key being in a readable file in the tested build. Rapid7 says no authentication check or private-address filter was disabled. Its remediation advice is to upgrade to Document Server 10.0 or later. A proof of concept is published on Rapid7’s GitHub repository. The post does not report exploitation in the wild. We found no evidence of exploitation as of 2026-11-17 in the Rapid7 post, the CISA KEV JSON (none of the five IDs) or the NVD entries for the three published IDs.

Pattern 1: one key, two token meanings

Per Rapid7, the browser-facing “Editor JWT” and the server-facing “Inbox” token are validated with the same effective signing key. A view-only Editor JWT therefore passed the signature check on /docbuilder. Our reading: the check was not designed to separate these token types. Rapid7 reports that the same endpoint can then read any file the ds account can read, including the session signing key, which allows forging session tokens.

Rapid7’s fix, as it describes it, passes a purpose into validation and rejects tokens containing opening fields such as editorConfig. Our illustration of the idea:

// Illustrative, not ONLYOFFICE code.
function verifyToken(token, expectedPurpose) {
  const claims = jwt.verify(token, keyFor(expectedPurpose), {
    algorithms: ["HS256"],
  });
  if (claims.purpose !== expectedPurpose) {
    throw new Error("token not issued for this endpoint");
  }
  return claims;
}

Our reading: a valid signature proves who signed a token, not what it is allowed to do. Use separate keys per purpose and put the purpose inside the signed claims.

Pattern 2: caller text appended to a structured message

Rapid7 reports that the third argument of builder.SaveFile() is appended as raw XML to a conversion task whose own paths were XML-encoded. Because the downstream parser lets a repeated element replace an earlier one, the caller could override the source path, destination path and formats. Rapid7 shows this selecting a directory-extraction mode, writing files into a directory the service watches, and getting code loaded by the logger configuration.

Its fix removes m_sFileFrom, m_sFileTo and m_sTempDir from the supplied parameters. An allowlist is the safer shape for the same idea:

// Illustrative allowlist of caller-settable options.
const ALLOWED = new Set(["m_oThumbnail", "m_nDoctParams"]);

function buildTask(serverFields, callerOptions) {
  const task = { ...serverFields };
  for (const [name, value] of Object.entries(callerOptions)) {
    if (!ALLOWED.has(name)) throw new Error(`option not allowed: ${name}`);
    task[name] = value;           // never overwrites server-owned fields
  }
  return toXml(task);             // one serializer, every value encoded
}

The option names above are placeholders. Build the message from fields, not by concatenating strings, so the caller cannot add elements.

Pattern 3: a path component from the request

Per Rapid7, a requested output format was appended to a filename, and on one save type the basename normalization was skipped, so traversal segments reached the filesystem backend. Rapid7’s fix checks the normalized storage key inside the shared storage layer:

const path = require("path");

function safeStoragePath(root, key) {
  const full = path.posix.normalize(`${root}/${key}`);
  if (full !== root && !full.startsWith(root + "/")) {
    throw new Error("path escapes storage root");
  }
  return full;
}

Putting the check in the storage layer protects every caller, not just the one route that was reported.

The last step: sudo with a wildcard

Rapid7 reports that the container’s sudoers file lets ds run documentserver-flush-cache.sh * as root without a password, and that the script placed its --hash argument inside a sed expression. Rapid7’s fix allows only [A-Za-z0-9._-] in that value. It also notes the 10.0 sudoers file still allows ds to run the (renamed) helper as root. Our assessment: a wildcard in a sudo rule is only as safe as the script’s argument handling, so audit such scripts as if they were network input.

Review checklist (ours)

  1. Does any token type share a signing key with another? Add a purpose claim and separate keys.
  2. Where do you concatenate caller text into XML, SQL, shell or sed? Replace with allowlists and encoders.
  3. Which request fields become part of a path? Check containment after normalization, in the storage layer.
  4. List every sudo rule that includes *.
  5. Run services as an account that cannot write to directories the service itself watches and reloads.

If you run ONLYOFFICE Docs, or an integration such as Zimbra that embeds it, plan the upgrade to 10.0 or later.

References