/

CVE-2025-66024

Severity:

CRITICAL RISK

(9.0)

Stored Cross-Site Scripting (XSS) in XWiki Blog Post Title

CVE-2025-66024

Modified

Vulnerability type

Category:

Stored Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Client-Side Code Execution and Account Compromise

Severity:

CRITICAL RISK

(9.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored cross-site scripting (XSS) flaw in the XWiki blog application allows JavaScript injected in the blog post title to be stored and later executed in visitors' browsers.

When a crafted title is rendered into the HTML <title> tag without escaping, any user viewing the blog post, including administrators, can have their session or privileges compromised.

Affected context

This vulnerability affects deployments of the XWiki blog application prior to version 9.15.7 where:

  • Users are allowed to create or edit blog posts.
  • Blog post titles are rendered into the page's <title> element without proper HTML or JavaScript escaping.
  • Browsers execute any script that ends up in the document head through the <title> tag context or related DOM access.

The issue is inherent to how the application handles and displays user-controlled titles rather than to any specific deployment configuration.

Exploit preconditions

  • Attack surface: Web interface of the XWiki blog application.
  • Required access: Ability to create or edit a blog post (authenticated contributor or higher, depending on configuration).
  • User interaction: A victim must load a page that displays the malicious blog post, typically by visiting its URL or a listing that renders its title.
  • Trigger point: Rendering of the blog post title into the HTML <title> tag (and associated DOM) without proper escaping.
  • Why exploitation is possible: User-controlled input is inserted into an HTML context without encoding, allowing attackers to inject script content that the browser interprets and executes.

Why this happens

The root cause is improper neutralization of user-supplied input before it is included in an HTML document, aligning with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

The blog application directly injects the blog post title into the <title> element without applying appropriate context-aware escaping or encoding.

This insecure pattern treats data as trusted markup, enabling an attacker to include characters or constructs that break out of the intended context and introduce executable JavaScript.

Potential impact

  • Theft of active session tokens, which may allow account takeover.
  • Execution of arbitrary JavaScript in the context of the XWiki origin.
  • Privilege escalation by performing administrative actions via the victim's browser.
  • Modification of wiki content or configuration through impersonated requests.
  • Delivery of phishing or social engineering content within the trusted site UI.

General mitigation guidance

Effective mitigation focuses on strict output encoding and minimizing trust in user-supplied data:

  • Apply context-aware escaping to all user-controlled fields before inserting them into HTML, including the <title> element (e.g., HTML-encoding special characters).
  • Enforce a centralized templating or rendering layer that automatically escapes variables by default, requiring explicit opt-out for trusted content only.
  • Limit where rich or unsafe markup is allowed; treat blog titles as plain text rather than HTML or script-capable fields.
  • Consider a Content Security Policy (CSP) to reduce the impact of any residual XSS by restricting script sources.
  • Follow the principle of least privilege for user roles so that fewer users can create content that is widely visible or trusted.

How teams detect issues like this

Organizations can detect similar XSS issues by:

  • Using static analysis or linters that flag unescaped insertion of user-controlled variables into HTML templates, particularly in <title>, <script>, event handlers, and inline attributes.
  • Adopting secure coding guidelines and code review checklists that require context-aware escaping for all dynamic output.
  • Employing dynamic application security testing (DAST) tools or automated scanners that probe input fields (like titles) with XSS payloads and observe reflected or stored execution.
  • Implementing template-level security checks or framework-provided safe-output primitives and enforcing them through code review or CI policies.

Sources

SourceLink
github.comgithub.com/xwiki-contrib/application-blog/commit/cca87f0a0edc2e7e049d46d51f4a4d8f78b714ba
github.comgithub.com/xwiki-contrib/application-blog/commit/cdcbf2816e9b329e8f006be4391a7ffe80d4bb3f
github.comgithub.com/xwiki-contrib/application-blog/security/advisories/GHSA-h2xq-h7f9-vh6c
jira.xwiki.orgjira.xwiki.org/browse/BLOG-245

Frequently asked

questions

Yes. Any attacker who can authenticate with sufficient rights to create or edit a blog post can exploit it remotely by saving a malicious title and then luring other users to view the affected page.

The attacker needs the ability to create or edit blog posts in the XWiki blog application. They do not need administrative privileges; standard contributor-level access is typically sufficient.

Ensure that all user-controlled values, including blog titles, are properly escaped according to their output context, and use framework or template features that escape by default rather than relying on manual sanitization.

Adopt a development practice that treats all input as untrusted, uses centralized, context-aware output encoding mechanisms, enforces secure templating conventions in code review and CI, and augments these practices with automated scanning for XSS patterns.

Find out what's already
exploitable in your codebase.