/

CVE-2026-27947

Severity:

HIGH RISK

(8.8)

Command Injection in Group-Office TNEF Attachment Processing

CVE-2026-27947

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-88, CWE-434

Impact:

Authenticated Remote Code Execution on the Group-Office server

Severity:

HIGH RISK

(8.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

Group-Office contains an authenticated remote code execution flaw in its TNEF (winmail.dat) attachment processing pipeline, where attacker-controlled filenames are passed to zip with a shell wildcard.

When a logged-in user processes a malicious winmail.dat attachment, crafted filenames can be interpreted as zip options, leading to arbitrary command execution under the server's Group-Office account.

Affected context

This vulnerability occurs in Group-Office deployments that:

  • Process TNEF (winmail.dat) attachments on the server side
  • Extract files from winmail.dat into a working directory
  • Invoke the zip utility with a shell wildcard (e.g., *) over those extracted files
  • Rely on system shell command construction that does not safely separate options from filenames

It becomes relevant when authenticated users or integrated workflows can cause the application to ingest attacker-controlled winmail.dat content.

Exploit preconditions

  • Attack surface: Server-side email / attachment processing in Group-Office.
  • Required access: Authenticated ability to upload or otherwise cause processing of a crafted winmail.dat (TNEF) attachment.
  • Trigger point: The TNEF processing flow extracts files from winmail.dat and later calls zip with a shell wildcard that expands over these attacker-controlled filenames.
  • Why exploitation is possible: Filenames extracted from the TNEF payload are not sanitized, normalized, or safely passed as arguments; when combined with a wildcard-based zip invocation, specially crafted filenames can be interpreted as command-line options (and potentially shell metacharacters), allowing arbitrary command execution.

Why this happens

The core issue is unsafe command construction that allows user-controlled data to influence command-line parsing.

In the TNEF attachment flow, the application:

  1. Extracts filenames directly from winmail.dat (attacker-controlled content),
  2. Places them into a directory,
  3. Calls the zip utility using a pattern like zip archive.zip * via a shell.

Because shell expansion and zip's option parsing are both sensitive to leading - and special characters, filenames crafted to look like options or to include shell metacharacters can alter the behavior of the command.

This aligns with CWE-88: Argument Injection or Modification, where untrusted input controls command-line arguments to system utilities. The behavior also overlaps with CWE-434: Unrestricted Upload of File with Dangerous Type, since arbitrary files are ingested and treated without sufficient validation, but the primary bug class is the unsafe argument handling and shell invocation.

Potential impact

  • Arbitrary command execution in the context of the Group-Office server process
  • Reading, modifying, or deleting application-managed data and configuration
  • Pivoting to other internal systems reachable from the application server
  • Planting backdoors or web shells for persistent access
  • Interfering with email processing, attachment integrity, or user data confidentiality

General mitigation guidance

Effective mitigation focuses on removing attacker control from command-line arguments and hardened file handling:

  • Avoid passing untrusted filenames to shell-constructed commands; use safe process invocation APIs that pass arguments as arrays without shell interpretation.
  • Do not rely on shell wildcards (e.g., *) over directories containing user-controlled filenames; build explicit, validated file lists in application logic.
  • Normalize and validate extracted filenames: reject names that begin with -, contain unexpected metacharacters, or are otherwise unsafe, and map them to benign, generated names.
  • Restrict what external utilities are used for attachment processing; prefer language-native libraries that avoid shelling out.
  • Run Group-Office and related processing components under least-privilege accounts with minimal filesystem and network rights, limiting the blast radius if a command is compromised.

How teams detect issues like this

Organizations can look for this pattern using:

  • Static analysis: Rules that flag uses of exec, system, popen, or similar APIs where arguments contain wildcards or concatenate paths derived from attachment or user input; checks for passing * or unvalidated filenames into shell commands.
  • Code review: Explicit review of email and attachment processing code paths, verifying that external utilities (like zip) are invoked with fixed options and sanitized arguments; red flags include building command strings manually and calling system shells.
  • Runtime monitoring: Application and OS-level logging for suspicious zip invocations (e.g., unusual options, unexpected working directories) and anomalous child processes spawned from the web or application server.
  • Policy enforcement: CI/CD pipelines that block merges when unsafe shell command patterns are detected, or when new attachment-processing code relies on external utilities instead of safer library APIs.

Sources

SourceLink
github.comgithub.com/Intermesh/groupoffice/security/advisories/GHSA-2rwh-9qp7-f92x

Frequently asked

questions

Yes, but it typically requires an authenticated user context in Group-Office. An attacker who can log in or otherwise cause the application to process a crafted winmail.dat attachment can remotely trigger the vulnerable TNEF processing path.

Exploitation requires the ability to authenticate to Group-Office and supply or trigger processing of a malicious TNEF (winmail.dat) file. No direct shell or filesystem access is needed; the exploitation happens through the server-side attachment handling.

The safest approach is to remove shell-based invocations that combine untrusted filenames and wildcards. Use APIs that pass arguments as arrays, validate and sanitize filenames (or replace them with generated safe names), and ensure external utilities cannot interpret attacker-controlled content as options.

Adopt a secure coding standard that forbids constructing shell commands with user-derived data, especially in file-processing workflows. Prefer library functions over external tools, enforce strict filename validation and normalization, and use automated code scanning plus peer review to catch unsafe command invocation patterns before deployment.

Find out what's already
exploitable in your codebase.