Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-pagenavi domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u918112125/domains/exploit.company/public_html/wp-includes/functions.php on line 6114
FoF Pretty Mail 1.1.2 - Server Side Template Injection (SSTI) - exploit.company
header-logo
Suggest Exploit
vendor:
FoF Pretty Mail
by:
Chokri Hammedi
6.1
CVSS
HIGH
Server Side Template Injection (SSTI)
94
CWE
Product Name: FoF Pretty Mail
Affected Version From: 1.1.2002
Affected Version To: 1.1.2002
Patch Exists: NO
Related CWE:
CPE: a:friendsofflarum:pretty_mail:1.1.2
Metasploit:
Other Scripts:
Platforms Tested: Windows XP
2024

FoF Pretty Mail 1.1.2 – Server Side Template Injection (SSTI)

FoF Pretty Mail 1.1.2 extension for Flarum is vulnerable to Server-Side Template Injection (SSTI) because it does not properly handle template variables. An attacker with administrative privileges can insert malicious code into the email template, which could result in executing arbitrary code on the server.

Mitigation:

To mitigate this vulnerability, it is recommended to sanitize and validate user input before processing it in email templates. Additionally, restricting administrative access and implementing proper input validation can help prevent SSTI attacks.
Source

Exploit-DB raw data:

Exploit Title: FoF Pretty Mail 1.1.2 - Server Side Template Injection (SSTI)
Date: 03/28/2024
Exploit Author: Chokri Hammedi
Vendor Homepage: https://flarum.org/
Software Link: https://github.com/FriendsOfFlarum/pretty-mail
Version: 1.1.2
Tested on: Windows XP
CVE: N/A
Description:

The FoF Pretty Mail extension for Flarum is vulnerable to Server-Side
Template Injection (SSTI) due to the unsafe handling of template variables.
An attacker with administrative access can inject malicious code into the
email template, leading to arbitrary code execution on the server.

Steps to Reproduce:

- Log in as an administrator on the Flarum forum.
- Navigate to the FoF Pretty Mail extension settings.
- Edit the email default template and insert the following payload:

{{ 7*7 }}
{{ system('id') }}
{{ system('echo "Take The Rose"') }}

- Save the changes to the email template.
- Trigger any action that sends an email, such as user registration or password reset.
- The recipient of the email will see the result of the injected expressions (e.g., "49" for {{ 7*7 }}, the output of the id command for {{ system('id') }}, and the output of the echo "Take The Rose" command for {{ system('echo"Take The Rose"') }}) in the email content.