{"answers":{"affected":"4 open source packages ship an affected version, including egroupware/egroupware.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40187 exists.","fix":"Upgrade egroupware/egroupware to a fixed version for your release line: 23.1.20260601 or 26.4.20260413.","what":"CVE-2026-40187 is a high-severity code injection vulnerability in egroupware, published on 20 Jul 2026. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40187 and fix it if it is affected.\n\nWhat it is: CVE-2026-40187 is a high-severity code injection vulnerability in egroupware, published on 20 Jul 2026. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40187 exists.\n\nAffected packages and fixed versions:\n- egroupware/egroupware (Packagist): affected all versions; fixed in 23.1.20260601\n- egroupware/egroupware (Packagist): affected all versions; fixed in 23.1.20260601\n- egroupware/egroupware (Packagist): affected from 26.0.20251208; fixed in 26.4.20260413\n- egroupware/egroupware (Packagist): affected from 26.0.20251208; fixed in 26.4.20260413\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40187/ (Markdown: https://insights.sbomify.com/CVE-2026-40187/index.md)","id":"CVE-2026-40187","markdown":"https://insights.sbomify.com/CVE-2026-40187/index.md","name":"CVE-2026-40187","record":{"aliases":["GHSA-8737-2x9g-xjj7"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"EGroupware web application","requires_auth":"high_privilege","summary":"Authenticated administrators can execute arbitrary OS commands by uploading malicious eTemplate files due to unsafe PHP eval usage.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.6,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"},{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"In egroupware version 26.0 and earlier, 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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Authenticated RCE via Malicious eTemplate Upload in EGroupware","id":"CVE-2026-40187","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":4,"n_references":1,"next":{"headline":"goshs is Missing Write Protection for Parametric Data Values","id":"CVE-2026-40188"},"packages":[{"ecosystem":"Packagist","fixed":["23.1.20260601"],"introduced":["0"],"last_affected":[],"package":"egroupware/egroupware","purl":null,"source":"GHSA-8737-2x9g-xjj7"},{"ecosystem":"Packagist","fixed":["23.1.20260601"],"introduced":["0"],"last_affected":[],"package":"egroupware/egroupware","purl":"pkg:composer/egroupware/egroupware","source":"GHSA-8737-2x9g-xjj7"},{"ecosystem":"Packagist","fixed":["26.4.20260413"],"introduced":["26.0.20251208"],"last_affected":[],"package":"egroupware/egroupware","purl":null,"source":"GHSA-8737-2x9g-xjj7"},{"ecosystem":"Packagist","fixed":["26.4.20260413"],"introduced":["26.0.20251208"],"last_affected":[],"package":"egroupware/egroupware","purl":"pkg:composer/egroupware/egroupware","source":"GHSA-8737-2x9g-xjj7"}],"prev":{"headline":"ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements","id":"CVE-2026-40186"},"products":["egroupware"],"published":"2026-07-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-20","vendors":["EGroupware"]},"summary":"Authenticated administrators can execute arbitrary OS commands by uploading malicious eTemplate files due to unsafe PHP eval usage.","url":"https://insights.sbomify.com/CVE-2026-40187/"}