Group-Office TNEF Attachment Handler OS Command Injection (CVE-2026-25512)
by Oreo (NumberOreo1) · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-25512
- Category
- web
- Affected product
- Group-Office groupware/webmail suite
- Affected versions
- Group-Office <= 26.0.4
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-02 |
| Author / Researcher | Oreo (NumberOreo1) |
| CVE / Advisory | CVE-2026-25512 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.4 (CVSS 4.0: AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H) |
| Status | Weaponized |
| Tags | command-injection, rce, groupware, email, tnef, cwe-78, authenticated, webmail |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Group-Office groupware/webmail suite |
| Versions Affected | Group-Office <= 26.0.4 |
| Language / Platform | Python 3 (PoC), target is a PHP web application |
| Authentication Required | Yes (valid session + CSRF security_token) |
| Network Access Required | Yes |
Summary
CVE-2026-25512 is an OS command injection in Group-Office’s TNEF (winmail.dat) attachment handler. The email/message/tnefAttachmentFromTempFile endpoint takes a user-controlled tmp_file parameter and concatenates it, unescaped, directly into a shell exec() call that invokes the tnef extraction utility. Because shell metacharacters in tmp_file are not sanitized, an authenticated attacker can append arbitrary commands to the string, which then execute under the web server’s privileges (www-data). The included PoC authenticates, retrieves the CSRF token, injects a payload, and confirms code execution by reading back an output marker embedded in the response ZIP.
Vulnerability Details
Root Cause
MessageController::actionTnefAttachmentFromTempFile() in www/modules/email/controller/MessageController.php builds a shell command via string concatenation using the raw tmp_file request parameter and passes it to PHP’s exec(), with no escaping or allow-listing of characters.
Attack Vector
- Authenticate to Group-Office and obtain a session plus CSRF
security_token. - Send a request to
index.php?r=email/message/tnefAttachmentFromTempFilewithtmp_filecontaining a shell metacharacter payload (e.g.dummy.dat;id > rce.txt;#). - The server executes the injected command as part of the
tnef/zipshell pipeline and returns a ZIP archive. - Extract the returned ZIP and read the attacker-specified output file (e.g.
rce.txt) to confirm command execution and retrieve output.
Impact
Full remote code execution as the web server user, enabling reading/modifying/deleting server files and pivoting further into the hosting environment.
Environment / Lab Setup
Target: Group-Office <= 26.0.4 web application
Attacker: Python 3, `requests` library, valid Group-Office credentials
Proof of Concept
PoC Script
See
poc.pyin this folder.
| |
Edit TARGET_URL, USER_NAME, and PASSWORD constants at the top of the script first. It logs in to obtain a security_token, sends the crafted tmp_file payload to the vulnerable endpoint, unzips the returned archive, and checks for a unique marker string to confirm RCE, printing the injected command’s output.
Detection & Indicators of Compromise
Signs of compromise:
- Unexpected processes spawned by the
www-data(or equivalent) web server user - Unusual files such as
rce.txtoridoutput dropped in the web application’s temp/working directories - Group-Office access logs showing
tnefAttachmentFromTempFilerequests with anomaloustmp_filevalues
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for advisory and update Group-Office when a fixed release is published |
| Interim mitigation | Validate/allow-list tmp_file to strictly match expected temp filename patterns; use escapeshellarg()/parameterized process execution instead of string concatenation into exec() |
References
Notes
Mirrored from https://github.com/NumberOreo1/CVE-2026-25512 on 2026-07-05.
| |