OS Command Injection in egroupware/egroupware (CVE-2026-40187)
Summary
OS command injection in egroupware/egroupware (CVE-2026-40187). Risk of unauthorized operations or information disclosure. Exploitable via chgrp. Mitigation: upgrade to 23.1.20260601 or later.
Original description
The description as published by the source.
Summary
An authenticated administrator can achieve OS-level Remote Code Execution (RCE) by uploading a malicious eTemplate XML file (.xet) to the VFS /etemplates mount.
The Widget::expand_name() method passes template widget attribute values directly into a PHP eval() call with only double-quote escaping applied - backtick characters are not escaped.
In PHP, backticks inside a double-quoted eval() string execute shell commands. This allows an admin-level user to escalate from web
application access to arbitrary OS command execution on the server.
Details
The vulnerability is located in api/src/Etemplate/Widget.php, Widget::expand_name(): (lines 703–728)
The method is designed to expand PHP variables (e.g., $row, $col,$cont[id]) in widget attribute values for auto-repeat grids. The eval() is triggered whenever $name contains a $ character (line 706). The only sanitization applied before the eval is:
str_replace('"', '\\"', $name)
This escapes double quotes only. Backtick characters are not escaped. In PHP, backticks inside a double-quoted string in eval() are treated as shell execution operators — equivalent to shell_exec(). A widget id of $row\id`` produces:
eval('$name = "$row`id`";'); // executes shell command: id
expand_name() is called from:
form_name()expand_widget()set_attrs()- `Template::run…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-40187 has been found in egroupware/egroupware.
Attackers can target a specific entry point like chgrp over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade egroupware/egroupware to 23.1.20260601 or later.
If unsure, ask your IT team or search "egroupware/egroupware CVE-2026-40187" on the vendor's site.
CVE-2026-40187 (egroupware/egroupware) — CWE-78
Attack surface: chgrp / Admins / chmod / php.ini
Patched: 23.1.20260601 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
OS command injection (CWE-78) exists in egroupware/egroupware. Attackers reach the vulnerable code path via chgrp.
Check the vendor advisory for the affected versions of egroupware/egroupware. Attack surface: chgrp / Admins / chmod / php.ini.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 23.1.20260601.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'egroupware/egroupware' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'egroupware/egroupware' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
egroupware/egroupwareを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade egroupware/egroupware to 23.1.20260601ステージング環境で 23.1.20260601 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com