CVE-2025-5256
Executive Summary
CVE-2025-5256 is an Open Redirection vulnerability in Mautic, an open-source marketing automation platform. The flaw resides in the /s/action/unlock/user.user/0 endpoint, where the returnUrl parameter is not properly validated. An attacker can craft a malicious URL that, when clicked by an authenticated user, redirects them to an arbitrary external website. This can be leveraged for phishing attacks, credential harvesting, or delivering exploit kits. The CVSS score is 5.4 (Medium), and no public exploit code or patch details are currently available.
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
Supply Chain & Package Security
Mautic is a PHP-based application distributed via GitHub and Composer. The vulnerability affects the core application logic, not a third-party package. However, organizations using Mautic should verify the integrity of their installation and monitor for updates from the official Mautic repository. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability is exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication is needed to trigger the redirect.
- User Interaction: Required (UI:R) – The victim must click the crafted URL.
- Scope: Unchanged (S:U) – The vulnerability does not affect other components.
- Confidentiality Impact: Low (C:L) – Potential for information disclosure via phishing.
- Integrity Impact: Low (I:L) – The redirect can lead to malicious sites.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. While the impact is limited to user interaction, the lack of authentication requirements and the potential for phishing campaigns make this a significant concern for Mautic deployments.
Deep Dive & Mechanics
The vulnerability exists in the user unlocking endpoint at /s/action/unlock/user.user/0. This endpoint is designed to unlock a user account after a lockout event. The returnUrl parameter is intended to redirect the user back to a specific page after the action is completed. However, the application fails to validate that the redirect target is a trusted, internal URL.
Attack Flow:
- An attacker crafts a URL such as:
https://victim-mautic.com/s/action/unlock/user.user/0?returnUrl=https://malicious-site.com - The attacker sends this URL to a legitimate user via email, social media, or other channels.
- The user, who may be logged into Mautic, clicks the link.
- Mautic processes the unlock action and then redirects the user to
https://malicious-site.com. - The malicious site can mimic a login page, steal credentials, or deliver malware.
The root cause is the lack of validation on the returnUrl parameter. The application should only allow redirects to relative paths or explicitly whitelisted domains.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// In the unlock controller
$returnUrl = $_GET['returnUrl'] ?? '/';
header('Location: ' . $returnUrl);
exit;
Patched Code (Conceptual):
// In the unlock controller
$returnUrl = $_GET['returnUrl'] ?? '/';
$allowedHosts = ['example.com', 'another-trusted-domain.com'];
$parsedUrl = parse_url($returnUrl);
if (isset($parsedUrl['host']) && !in_array($parsedUrl['host'], $allowedHosts)) {
$returnUrl = '/';
}
header('Location: ' . $returnUrl);
exit;
The patched version validates the host against a whitelist. If the host is not trusted, the redirect defaults to the root path.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A Mautic instance (version unknown, but likely < 5.x)
- A victim user logged into Mautic
- A controlled malicious website
Exploitation Steps:
- Identify the Mautic instance URL (e.g.,
https://victim-mautic.com). - Craft the malicious URL:
https://victim-mautic.com/s/action/unlock/user.user/0?returnUrl=https://attacker-controlled.com/phishing - Send the URL to the victim via email or social engineering.
- When the victim clicks, they are redirected to the attacker's site.
Proof of Concept (PoC) Script:
import requests
target = "https://victim-mautic.com"
malicious_url = "https://attacker-controlled.com/phishing"
payload = f"{target}/s/action/unlock/user.user/0?returnUrl={malicious_url}"
print(f"Send this URL to the victim: {payload}")
Blue Team
Detection:
- Monitor logs for requests to
/s/action/unlock/user.user/0with suspiciousreturnUrlparameters. - Look for
returnUrlvalues pointing to external domains not in the whitelist. - Use the Sigma rule below to detect anomalous redirects.
Mitigation:
- Apply input validation on the
returnUrlparameter. - Implement a whitelist of allowed redirect domains.
- Use a centralized redirect proxy that validates URLs.
Indicators of Compromise (IOCs)
- URL Pattern:
/s/action/unlock/user.user/0?returnUrl=* - Suspicious Domains: Any external domain in the
returnUrlparameter. - Log Entries: HTTP 302 responses from the unlock endpoint with external
Locationheaders. - Network Traffic: Outbound connections to unknown domains shortly after a user accesses the unlock endpoint.
Detection Engineering
YARA Rule
rule CVE_2025_5256_Open_Redirect {
meta:
description = "Detects open redirect attempts in Mautic unlock endpoint"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-5256"
strings:
$endpoint = "/s/action/unlock/user.user/0"
$returnUrl = "returnUrl="
$http = /https?:\/\//
condition:
$endpoint and $returnUrl and $http
}
Sigma Rule
title: Mautic Open Redirect via returnUrl
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects open redirect attempts in Mautic unlock endpoint
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "/s/action/unlock/user.user/0?returnUrl="
cs-uri-query|re: "returnUrl=https?://"
condition: selection
falsepositives:
- Legitimate redirects to trusted domains
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-5256 Mautic Open Redirect"; flow:to_server,established; content:"/s/action/unlock/user.user/0"; http_uri; content:"returnUrl="; http_uri; pcre:"/returnUrl=https?:\/\//Ri"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Mautic: Apply the latest patch from the official repository once available.
- Input Validation: Manually patch the
returnUrlparameter to only allow relative paths or whitelisted domains. - Web Application Firewall (WAF): Deploy a WAF rule to block requests with external
returnUrlvalues.
Long-Term Measures:
- Implement a centralized redirect validation function.
- Conduct regular security audits of all endpoints.
- Educate users about phishing risks and suspicious URLs.
Workaround:
- Disable the unlock endpoint if not needed, or restrict access via IP whitelisting.
Valters IT
Securing Digital Frontiers