Invision Community Theme Editor Template Injection Unauthenticated RCE (CVE-2025-47916)
by Egidio Romano (vulnerability discovery); Web3-Serializer (this PoC client) · 2026-07-06
- Severity
- Critical
- CVE
- CVE-2025-47916
- Category
- web
- Affected product
- Invision Community, themeeditor front controller (IPS\core\modules\front\system\themeeditor::customCss())
- Affected versions
- 5.0.0 through 5.0.6 (fixed in 5.0.7)
- Disclosed
- 2026-07-06
- Patch status
- patched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-06 |
| Last Updated | 2026-07-06 |
| Author / Researcher | Egidio Romano (vulnerability discovery); Web3-Serializer (this PoC client) |
| CVE / Advisory | CVE-2025-47916 |
| Category | web |
| Severity | Critical |
| CVSS Score | 10.0 (per NVD) |
| Status | Weaponized |
| Tags | invision-community, ssti, template-injection, theme-editor, unauthenticated-rce, php, cwe-94, python |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Invision Community, themeeditor front controller (IPS\core\modules\front\system\themeeditor::customCss()) |
| Versions Affected | 5.0.0 through 5.0.6 (fixed in 5.0.7) |
| Language / Platform | Python 3 (exploit client); PHP (target, Invision Community) |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
Invision Community’s theme editor exposes a customCss() action on the front-end themeeditor controller (/applications/core/modules/front/system/themeeditor.php) that is reachable without authentication and passes the attacker-supplied content request parameter into Theme::makeProcessFunction(), which processes it as a template expression. Because template expressions can invoke PHP functions, an attacker can craft a content value that evaluates to arbitrary PHP code execution, resulting in unauthenticated remote code execution against the Invision Community forum/community platform. The included PoC (main.py) is a small client that base64-encodes a shell command, wraps it in a template expression calling system()/base64_decode() wrapped with a die() and a unique marker string, POSTs it to the vulnerable customCss action, and extracts the command output from the response — offering single-command execution, a non-intrusive vulnerability test mode, and an interactive pseudo-shell.
Vulnerability Details
Root Cause
The customCss() method of the themeeditor front controller accepts a content POST parameter and passes it through Theme::makeProcessFunction(), which is designed to compile/process legitimate theme template syntax but does not require authentication or restrict the expression to safe operations. This allows a crafted template expression to call arbitrary PHP functions:
| |
The {expression="..."} template syntax is evaluated by the theme engine, invoking system(base64_decode(<attacker command>)) and using die('________'...) both to terminate output early (limiting extraneous page content) and to provide a unique delimiter the client can use to reliably extract command output from the HTTP response.
Attack Vector
- Attacker base64-encodes an arbitrary OS command.
- Attacker sends an unauthenticated POST request to the target’s front-end router with
app=core,module=system,controller=themeeditor,do=customCss, andcontentset to a template expression:{expression="die('________'.system(base64_decode('<base64-cmd>')))"}. - The
customCss()handler passescontenttoTheme::makeProcessFunction(), which evaluates the template expression, invoking PHP’ssystem()on the decoded command. - The
die('________'...)call halts further page rendering and prepends a unique marker string to the command’s output, allowing the client to split the response on________and recover clean command output.
Impact
Unauthenticated remote code execution as the web server/PHP process user on the Invision Community host, since the theme editor’s template evaluation is reachable without authentication and permits arbitrary PHP function calls.
Environment / Lab Setup
Target: Invision Community 5.0.0 - 5.0.6, front-end reachable at http://<target>/
Attacker: Python 3, `pip install requests`
Proof of Concept
PoC Script
See
main.pyin this folder.
| |
Detection & Indicators of Compromise
Signs of compromise:
- POST requests to the front controller with
do=customCssfrom unauthenticated/anonymous sessions - PHP-FPM/web server worker processes spawning shell commands (
system,exec) correlated withthemeeditorrequests - Unexpected outbound activity or new files/webshells appearing shortly after such requests
Remediation
| Action | Detail |
|---|---|
| Primary fix | Update to Invision Community 5.0.7 or later, which resolves the template injection in the theme editor’s customCss() action |
| Interim mitigation | Block or restrict unauthenticated access to the themeeditor controller’s customCss action at the WAF/reverse-proxy level until patched |
References
Notes
Mirrored from https://github.com/Web3-Serializer/CVE-2025-47916 on 2026-07-06. main.py implements a working unauthenticated RCE client (template-injection payload) for Invision Community with an interactive shell; vulnerability originally discovered by Egidio Romano and disclosed via Karma In Security Advisory KIS-2025-02.
| |