Skip to main content
Vulnerability Database/CVE-2025-54117

CVE-2025-54117: NamelessMC XSS Vulnerability

CVE-2025-54117 is a cross-site scripting flaw in NamelessMC allowing authenticated attackers to inject malicious scripts via the dashboard text editor. This article covers technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-54117 Overview

NamelessMC is a free, open-source website software widely deployed by Minecraft server operators to manage community sites, forums, and player accounts. A stored cross-site scripting (XSS) vulnerability [CWE-79] affects NamelessMC versions prior to 2.2.3 and is fixed in 2.2.4. Authenticated attackers with dashboard access can inject arbitrary HTML or JavaScript through the dashboard text editor component. The injected payload executes in the browser context of any user who views the affected content, enabling session theft, account takeover, and further pivoting into administrative functions.

Critical Impact

An authenticated user with dashboard privileges can persist malicious script into content rendered to other users, including administrators, leading to session compromise and privilege escalation across the NamelessMC installation.

Affected Products

  • NamelessMC Nameless versions prior to 2.2.3
  • Component: dashboard WYSIWYG text editor (Output::getPurified sanitization path)
  • Fixed in NamelessMC 2.2.4

Discovery Timeline

  • 2025-08-18 - CVE-2025-54117 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-54117

Vulnerability Analysis

The flaw is a stored cross-site scripting issue in NamelessMC's dashboard text editor. Content submitted through the editor is stored in the database and later rendered to other users without sufficient HTML purification for non-editor contexts. Because the payload persists server-side, every subsequent page load executes the attacker's script in the victim's browser session. Exploitation requires an authenticated account with permission to submit content through the dashboard, and requires a victim to view the poisoned resource.

Successful exploitation allows the attacker to read the victim's session token, perform actions in the victim's context, and modify site content. When the victim is a NamelessMC administrator, the attacker can escalate to full site control.

Root Cause

The root cause is inconsistent HTML sanitization between content authored for the WYSIWYG editor and content displayed in non-editor surfaces such as announcements. The Output::getPurified method in core/classes/Core/Output.php previously applied a purifier configuration tuned for editor reuse, which preserved markup that is safe to re-edit but unsafe to render as trusted HTML in other contexts. Announcement rendering in core/classes/DTO/Announcement.php called the purifier without signaling that the output was destined for direct display, allowing script-bearing markup to survive.

Attack Vector

An authenticated attacker submits crafted HTML or JavaScript payloads through the dashboard text editor. The malicious content is stored in the database and served to other authenticated users when they load the affected page. Exploitation requires user interaction in that a victim must visit the poisoned content. The vulnerability crosses trust scopes because content injected by a lower-privileged user can execute in an administrator's browser.

php
// Patch: core/classes/Core/Output.php
// Adds a $for_editor flag so purification can distinguish between
// content rendered back into the WYSIWYG editor and content
// rendered directly in the page.
-    public static function getPurified(?string $input, bool $escape_invalid = false): string
+    public static function getPurified(?string $input, bool $escape_invalid = false, bool $for_editor = true): string
     {
         if (!isset(self::$_purifier)) {
             $purifierConfig = HTMLPurifier_Config::createDefault();

// Patch: core/classes/DTO/Announcement.php
// Announcement messages are now purified with $for_editor = false,
// applying stricter sanitization for direct rendering.
-        $this->message = Output::getPurified($row->message);
+        $this->message = Output::getPurified($row->message, false, false);

Source: NamelessMC commit 0e77706b

Detection Methods for CVE-2025-54117

Indicators of Compromise

  • Dashboard content, announcements, or forum posts containing <script> tags, inline event handlers such as onerror=, onload=, or onclick=, or javascript: URIs.
  • Unexpected outbound requests from user browsers to attacker-controlled domains shortly after loading NamelessMC pages.
  • New administrator accounts, permission changes, or password resets that correlate with dashboard content modifications.
  • Audit log entries showing content edits from low-privileged accounts followed by administrator session activity from unusual IP addresses.

Detection Strategies

  • Review the NamelessMC database nl2_announcements table and other editor-backed tables for HTML tags or attributes that should not appear in user-authored content.
  • Inspect web server access logs for POST requests to dashboard editor endpoints followed by GET requests that trigger anomalous JavaScript execution.
  • Deploy a Content Security Policy (CSP) in report-only mode to surface script executions that violate expected inline-script boundaries.

Monitoring Recommendations

  • Enable and centrally collect NamelessMC administrative action logs to correlate content edits with subsequent privilege changes.
  • Monitor for cookie or session token exfiltration patterns in egress traffic from user endpoints browsing the NamelessMC site.
  • Alert on creation or modification of administrator accounts outside of expected change windows.

How to Mitigate CVE-2025-54117

Immediate Actions Required

  • Upgrade NamelessMC to version 2.2.4 or later, which contains the fix in commit 0e77706b.
  • Audit all dashboard-editor content, announcements, and forum posts created before the upgrade for embedded scripts or event handlers, and remove suspicious entries.
  • Rotate administrator session cookies and force re-authentication for privileged accounts after patching.
  • Review recent administrative changes for indicators of account takeover during the exposure window.

Patch Information

The upstream fix is available in the GitHub Security Advisory GHSA-gp3j-j84w-vqxx and the corresponding NamelessMC commit 0e77706b. The patch introduces a $for_editor parameter to Output::getPurified and applies stricter purification to content rendered outside the WYSIWYG editor, including announcement messages.

Workarounds

  • Restrict dashboard and content-editing permissions to a minimal set of trusted operators until the upgrade to 2.2.4 is deployed.
  • Deploy a strict Content Security Policy that disallows inline scripts and restricts script sources to trusted origins.
  • Place the NamelessMC application behind a web application firewall configured to block common XSS payload patterns on editor endpoints.
bash
# Example: verify installed NamelessMC version and upgrade path
grep -R "NAMELESS_VERSION" /var/www/nameless/core/ | head -n 5

# After upgrade, confirm patched file signature
git -C /var/www/nameless log --oneline core/classes/Core/Output.php | head -n 5
git -C /var/www/nameless log --oneline core/classes/DTO/Announcement.php | head -n 5

# Example CSP header for the web server (nginx)
# add_header Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'" always;

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.