/

CVE-2026-113630

Severity:

HIGH RISK

(7.8)

Command Injection (CWE-78) in ONLYOFFICE Cache Helper

CVE-2026-113630

Awaiting Analysis

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Privilege Escalation to Root

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection flaw in ONLYOFFICE Docs' cache-flushing helper can let a local attacker who already has command execution as the ds user run commands as root. The risk arises when the helper is invoked with a crafted --hash argument, which is interpolated into a GNU sed expression and run through a passwordless sudo rule.

Affected context

The issue affects the documentserver-flush-cache.sh maintenance helper in ONLYOFFICE Docs (Document Server) 9.4.0-129 on the official onlyoffice/documentserver container. It becomes relevant where the packaged sudoers policy allows the ds user to run this helper as root without a password and with unrestricted arguments.

Exploit preconditions

  • Attack surface: The maintenance helper inside the affected container
  • Required access: Command execution as the ds user
  • Trigger point: Invocation of the helper with a crafted --hash argument
  • Why exploitation is possible: The argument is interpolated without validation into a GNU sed expression, whose e flag can execute commands; the sudoers rule permits the helper to run as root with unrestricted arguments

Why this happens

The helper places attacker-influenced input into a command expression without safely constraining or encoding it. GNU sed's e flag can execute text as a command, and the broad sudoers permission causes the helper to run with root privileges. This is a command injection flaw mapped to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker with command execution as ds could execute arbitrary commands as root in the container.
  • The container's files, processes, and services could be compromised.
  • Depending on container privileges and isolation, an attacker could attempt to access connected resources or affect other systems.

General mitigation guidance

Defensive approaches focus on preventing untrusted input from becoming executable command syntax and limiting the authority of maintenance helpers.

  • Prefer APIs that avoid shell or expression interpretation; if external tools are necessary, pass arguments through safe interfaces and validate them against a strict format.
  • Avoid embedding user-controlled values in sed expressions, especially expressions that support command execution.
  • Configure sudo permissions narrowly, limiting permitted commands and arguments rather than allowing unrestricted invocation.
  • Apply least privilege to the helper and container, and restrict who can obtain command execution as the ds user.
  • Treat runtime arguments as untrusted, even when they are supplied by an internal service or maintenance workflow.

How teams detect issues like this

  • Use static analysis to identify untrusted values interpolated into shell commands or sed expressions, particularly expressions using command-execution features.
  • Review sudoers policies for maintenance scripts granted elevated privileges with unrestricted arguments.
  • Enforce code-review and CI policies that flag shell construction from untrusted input and overly broad privilege rules.
  • Monitor helper invocations and privilege transitions from the ds account for unexpected arguments or command activity.

Sources

SourceLink
github.comgithub.com/jburgess-r7/onlyoffice-2026-pocs
rapid7.comrapid7.com/blog/post/ve-from-view-only-access-to-container-root-five-vulnerabilities-in-onlyoffice-docs-fixed/

Frequently asked

questions

The described attack requires command execution as the ds user in the affected container; the helper and its sudo permission provide the path to root-level execution.

An attacker needs to be able to run commands as ds and invoke the maintenance helper with attacker-controlled arguments.

Avoid constructing executable expressions from untrusted input, and narrow elevated permissions so helpers accept only necessary, validated arguments.

Use APIs that do not interpret input as commands, apply strict input validation, review privileged scripts and sudoers policies, and run components with least privilege.

Find out what's already
exploitable in your codebase.