CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-47916
10.089.99%

CVE-2025-47916: Unauthenticated RCE in Invision Community via SSTI

Alon Barad
Alon Barad
Software Engineer

Feb 28, 2026·4 min read·4 visits

Weaponized

Executive Summary (TL;DR)

Critical RCE in Invision Community 5.0.x allows unauthenticated attackers to execute arbitrary PHP code. The issue stems from an exposed 'customCss' controller method that processes unsanitized input via the template engine. Patched in version 5.0.7.

A critical remote code execution vulnerability exists in Invision Community versions 5.0.0 through 5.0.6. The flaw resides in the 'themeeditor' controller, where improper access control allows unauthenticated users to invoke the 'customCss' method. This method passes user-supplied input directly to the internal template engine without sanitization. By injecting malicious template directives, attackers can execute arbitrary PHP code on the underlying server. The vulnerability carries a CVSS score of 10.0 and has been patched in version 5.0.7.

Vulnerability Overview

CVE-2025-47916 represents a critical security failure in the Invision Community platform, specifically affecting versions 5.0.0 through 5.0.6. The vulnerability is a combination of Improper Access Control (CWE-284) and Server-Side Template Injection (CWE-1336), resulting in unauthenticated Remote Code Execution (RCE).

The specific flaw is located within the themeeditor.php controller file. Despite the sensitive nature of theme editing functionality, the application exposes a method intended for CSS processing to unauthenticated web requests. Because this method utilizes the application's powerful template engine to parse input, it inadvertently exposes a mechanism for arbitrary code execution.

With a CVSS v3.1 score of 10.0, this issue is classified as critical. It requires no authentication, no user interaction, and can be exploited remotely over the network. The impact is total system compromise, allowing attackers to bypass all application security controls.

Root Cause Analysis

The vulnerability stems from two concurrent failures in the /applications/core/modules/front/system/themeeditor.php file.

1. Improper Access Control: The method customCss() is defined within the controller. While declared protected, the Invision Community routing dispatcher in the affected versions allows external requests to invoke this method by specifying the do=customCss parameter. This bypasses the standard authentication checks typically required for administrative actions.

2. Unsafe Template Processing: Inside the customCss() method, the application retrieves raw user input from Request::i()->content and passes it directly to Theme::makeProcessFunction(). This function is the core of the Invision template engine, responsible for compiling template strings into executable PHP code. The engine supports specific syntax, such as {expression="..."}, which evaluates the contained string as PHP code. By injecting this syntax, an attacker forces the server to compile and execute arbitrary PHP commands.

Code Analysis

The following analysis highlights the vulnerable logic in themeeditor.php prior to the patch.

Vulnerable Code (Versions 5.0.0 - 5.0.6):

protected function customCss() : void
{
    $functionName = "css_" . uniqid();
    
    // CRITICAL: User input (Request::i()->content) is passed directly 
    // to the template compiler (Theme::makeProcessFunction).
    Theme::makeProcessFunction( 
        Theme::fixResourceTags( (string) Request::i()->content, 'front' ), 
        $functionName, 
        '', 
        FALSE, 
        TRUE 
    );
 
    $fqFunc     = 'IPS\\Theme\\'. $functionName;
    // The compiled function is immediately executed.
    $content    = Theme::minifyCss( $fqFunc() );
 
    /* Replace any <fileStore.xxx> tags in the CSS */
    Output::i()->parseFileObjectUrls( $content );
    Output::i()->json( [ 'content' => $content ] );
}

The Theme::makeProcessFunction generates a temporary PHP function based on the input string. If the input contains {expression="system('id')"}, the generated PHP function will contain a call to system('id'). When $fqFunc() is called lines later, that payload executes.

Remediation in Version 5.0.7: The vendor addressed this by modifying the access control logic for the themeeditor controller or removing the accessible route entirely for unprivileged users. The fix prevents the dispatcher from routing unauthenticated requests to this sensitive method.

Exploitation Methodology

Exploiting CVE-2025-47916 is trivial and requires only a single HTTP POST request. The attacker does not need credentials or a specific server configuration.

Attack Workflow:

  1. Target Identification: The attacker identifies a target running Invision Community 5.0.x.
  2. Payload Construction: The attacker crafts a payload using the template engine's expression syntax. A common payload for verifying execution is {expression="die(system('id'))"}.
  3. Request Transmission: The attacker sends a POST request to the root index.php or the specific controller path.

Example HTTP Request:

POST /index.php HTTP/1.1
Host: target.example.com
Content-Type: application/x-www-form-urlencoded
 
app=core&module=system&controller=themeeditor&do=customCss&content={expression="die(system('whoami'))"}

Execution Flow Diagram:

Upon processing, the server executes whoami and returns the output in the HTTP response, confirming code execution.

Impact Assessment

The impact of this vulnerability is catastrophic for affected deployments.

System Compromise: Successful exploitation grants the attacker code execution privileges equivalent to the web server user (typically www-data or apache). This allows for reading configuration files (such as conf_global.php), which contain database credentials and encryption keys.

Data Breach: With database access, attackers can exfiltrate sensitive user data, including hashed passwords, email addresses, and private messages. This constitutes a significant privacy breach and regulatory violation (GDPR, CCPA).

Persistence and Lateral Movement: Attackers can upload web shells or backdoors to maintain persistent access even after the vulnerability is patched. If the web server is not properly isolated, this entry point can be used to pivot to other internal systems within the network infrastructure.

Official Patches

Invision Power ServicesInvision Community Release Notes for 5.0.7

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
89.99%
Top 0% most exploited

Affected Systems

Invision Community 5.0.0Invision Community 5.0.1Invision Community 5.0.2Invision Community 5.0.3Invision Community 5.0.4Invision Community 5.0.5Invision Community 5.0.6

Affected Versions Detail

Product
Affected Versions
Fixed Version
Invision Community
Invision Power Services
>= 5.0.0, <= 5.0.65.0.7
AttributeDetail
CWE IDCWE-1336
CVSS v3.110.0 (Critical)
Attack VectorNetwork
EPSS Score0.89988 (89.99%)
Exploit StatusWeaponized / Public PoC
ImpactRemote Code Execution

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059.003Command and Scripting Interpreter: PHP
Execution
CWE-1336
Server-Side Template Injection

Improper Neutralization of Special Elements Used in a Template Engine

Known Exploits & Detection

NucleiNuclei detection template for unauthenticated RCE
NucleiDetection Template Available

Vulnerability Timeline

Vulnerability discovered by Egidio Romano
2025-05-10
Vendor releases patch (Version 5.0.7)
2025-05-12
Public disclosure and CVE assignment
2025-05-14

References & Sources

  • [1]NVD - CVE-2025-47916