Skip to main content

CVE-2025-5411: Mist Community Edition XSS Vulnerability

CVE-2025-5411 is a cross-site scripting flaw in Mist Community Edition that allows attackers to inject malicious scripts through tag manipulation. This article covers technical details, affected versions, and remediation 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-5411 Overview

CVE-2025-5411 is a cross-site scripting (XSS) vulnerability affecting Mist Community Edition up to version 4.7.1. The flaw resides in the tag_resources function within src/mist/api/tag/views.py. Manipulation of the tag argument allows attackers to inject arbitrary script content into the application. The vulnerability is remotely exploitable and requires low privileges with user interaction. A public exploit disclosure exists, increasing the risk of opportunistic abuse. The maintainers addressed the issue in Mist Community Edition version 4.7.2 via commit db10ecb62ac832c1ed4924556d167efb9bc07fad. The weakness is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Authenticated attackers can inject malicious JavaScript via the tag parameter, enabling session hijacking, credential theft, and actions performed in the context of other authenticated Mist users.

Affected Products

  • Mist Community Edition versions up to and including 4.7.1
  • The vulnerable function tag_resources in src/mist/api/tag/views.py
  • Fixed in Mist Community Edition version 4.7.2

Discovery Timeline

  • 2025-06-01 - CVE-2025-5411 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-5411

Vulnerability Analysis

Mist Community Edition is an open-source multi-cloud management platform. The tag_resources endpoint accepts user-supplied input through the tag argument without proper neutralization. When the tag value is later rendered in the web interface, embedded script content executes in the browser of any user viewing the affected resource. This behavior corresponds to a stored or reflected XSS condition depending on how the tag is persisted and rendered. Exploitation requires an authenticated low-privilege session and user interaction, such as viewing a page where the malicious tag is displayed. The public disclosure of the exploit raises the likelihood of integration into automated attack tooling. The current EPSS score is 0.348% with a percentile of 26.978.

Root Cause

The root cause is missing output encoding or input sanitization for the tag parameter processed by tag_resources. User-controlled tag values flow directly into rendered HTML without contextual escaping, allowing arbitrary HTML and JavaScript injection. The upstream patch introduces additional security controls, including a SameSite=Strict cookie flag to harden session handling against cross-site request forgery that could be chained with XSS primitives.

Attack Vector

An authenticated attacker submits a crafted payload to the tag_resources endpoint, embedding JavaScript within the tag argument. When a victim user loads a view that renders the tag, the script executes in the victim's browser session. Attackers can use this primitive to exfiltrate session cookies, pivot to administrative account takeover, or trigger unauthorized API calls under the victim's identity.

python
# Patch excerpt: src/mist/api/auth/middleware.py
# Hardens session cookie handling alongside the XSS fix
if isinstance(session, SessionToken) and \
        not getattr(session, 'internal', False) and \
        not session.last_accessed_at:
    # (CSRF) Security Fix: Added SameSite=Strict flag to prevent CSRF attack
    # in admin's "su" operation. In case of having a cookie issue, consider
    # removing and addressing the CSRF issue in another way
    cookie = 'session.id=%s; Path=/; SameSite=Strict;' % session.token
    headers.append(('Set-Cookie', cookie))

Source: Mist API Commit db10ecb

Detection Methods for CVE-2025-5411

Indicators of Compromise

  • HTTP requests to tag-related API endpoints containing <script>, javascript:, onerror=, or encoded variants in the tag parameter.
  • Unusual outbound requests originating from Mist web sessions to attacker-controlled domains that may indicate cookie or token exfiltration.
  • Creation or modification of tags containing HTML markup, event handlers, or SVG payloads instead of plain text labels.

Detection Strategies

  • Review Mist API access logs for POST and PUT calls to tag_resources with payloads matching XSS signature patterns.
  • Deploy a web application firewall rule inspecting the tag parameter for HTML entities, script tags, and common XSS obfuscation techniques.
  • Compare installed Mist Community Edition versions against the fixed release v4.7.2 using software inventory data.

Monitoring Recommendations

  • Monitor browser-side Content Security Policy (CSP) violation reports for inline script execution on Mist interface pages.
  • Alert on authenticated sessions generating anomalous requests shortly after loading tag-rendered views.
  • Track changes to the tag_resources endpoint and related templates for unauthorized modifications.

How to Mitigate CVE-2025-5411

Immediate Actions Required

  • Upgrade Mist Community Edition to version 4.7.2 or later to apply the official patch.
  • Audit existing tags across the deployment for malicious payloads and purge any entries containing executable content.
  • Rotate session tokens and API keys for users who may have interacted with compromised tag views.

Patch Information

The fix is delivered in Mist Community Edition release v4.7.2 through commit db10ecb62ac832c1ed4924556d167efb9bc07fad. The patch addresses the XSS condition in tag_resources and additionally enforces SameSite=Strict on session cookies to limit CSRF chaining.

Workarounds

  • Restrict access to the Mist Community Edition management interface to trusted networks via firewall or VPN until patching completes.
  • Enforce a strict Content Security Policy that disallows inline scripts and limits script sources to trusted origins.
  • Review and limit which user roles can create or modify tags, reducing the pool of accounts that can introduce payloads.
bash
# Verify installed Mist CE version and upgrade
docker exec -it mist-ce cat /mist.api/VERSION

# Pull and deploy the patched release
git clone --branch v4.7.2 https://github.com/mistio/mist-ce.git
cd mist-ce
docker compose pull
docker compose up -d

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.