/

CVE-2026-41201

Severity:

CRITICAL RISK

(9.1)

XSS in CI4MS Backup Module Filename Handling

CVE-2026-41201

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Account Takeover and Privilege Escalation via Stored DOM XSS

Severity:

CRITICAL RISK

(9.1)

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

CI4MS version 0.31.4.0 contains a stored DOM-based cross-site scripting vulnerability in the backup module's filename field, where attacker-controlled content from a tampered SQL backup can be rendered as executable script in the browser.

When an administrator or privileged user views or interacts with the affected backup entry, the hidden XSS payload can execute in their session, potentially leading to full account takeover and privilege escalation within the CMS.

Affected context

The vulnerability exists in CI4MS deployments that use the backup module to manage or restore SQL-based backups where filenames are displayed or manipulated in the browser.

It manifests when the application:

  • Accepts or imports SQL backup files whose metadata includes a filename field
  • Stores the attacker-controlled filename and later exposes it in the web UI
  • Renders that value into the DOM without strict output encoding or safe handling

The issue is most impactful where privileged users (e.g., admins) routinely access the backup interface in their browsers.

Exploit preconditions

  • Attack surface: Web interface of the CI4MS backup module, typically limited to authenticated users with access to backup functionality.
  • Required access: Ability to introduce or influence a backup SQL file processed by CI4MS so that its filename field carries a malicious script payload.
  • Trigger point: Viewing, listing, or interacting with the affected backup record in the admin/backup UI, causing the browser to render the tainted filename into the DOM.
  • Why exploitation is possible: The application treats filename content as display-safe and injects it into the page without robust context-aware output encoding or sanitization, enabling DOM execution of attacker-supplied script code in the victim's session.

Why this happens

At its core, this is a Stored DOM-based Cross-Site Scripting issue aligned with CWE-79: Improper Neutralization of Input During Web Page Generation.

The backup module persists attacker-controlled filename data originating from a SQL file and subsequently injects it into the client-side DOM without proper encoding or sanitization appropriate to the context (e.g., HTML, attribute, or JavaScript context).

Because the browser interprets some characters as markup or script, this unsafe pattern allows the injected payload to execute whenever the UI renders the malicious filename, specifically in the context of the currently authenticated user.

Potential impact

  • Full account takeover of an administrator or other privileged user whose browser executes the payload
  • Privilege escalation from a lower-privileged context to administrative control by hijacking a more privileged session
  • Unauthorized changes to CMS configuration, themes, RBAC rules, or content
  • Creation or deletion of user accounts and elevation of roles within the system
  • Execution of actions on behalf of the victim (CSRF-like effects within the app, but driven by XSS)
  • Theft of sensitive data accessible in the victim's browser context, such as CSRF tokens or session identifiers
  • Lateral movement by leveraging compromised admin privileges to alter other modules or deploy further malicious content

General mitigation guidance

Effective mitigation relies on treating all user- or file-sourced data as untrusted and enforcing strong output encoding rules:

  • Apply strict, context-aware output encoding for any dynamic data rendered into HTML, attributes, URLs, or JavaScript contexts, especially for backup metadata like filenames.
  • Favor server-side templating and automatic escaping frameworks rather than manually concatenating untrusted data into the DOM or client-side script.
  • Constrain permissible backup filename formats to a narrow character set and length, rejecting or normalizing unexpected characters instead of blindly persisting them.
  • Implement layered validation on both import and display paths, ensuring that even if unsafe data is ingested, it is neutralized before reaching the browser.
  • Enforce least-privilege principles for admin features and consider segregating backup management to dedicated, more tightly controlled accounts.
  • Where feasible, use Content Security Policy (CSP) with nonces or hashes to reduce the risk of inline script execution, acknowledging that CSP must be a defense-in-depth measure rather than the primary control.

How teams detect issues like this

Organizations can surface this class of vulnerability through multiple complementary approaches:

  • Static analysis: Configure SAST tools or custom rules to flag direct insertion of untrusted variables into HTML, attributes, or JavaScript without passing through an escaping or encoding function.
  • Code review: During manual review, examine modules that render filenames, labels, or other metadata from backups or imports, checking for proper encoding and strict validation.
  • Security testing: Use automated DAST scanners and targeted penetration tests against admin/backup interfaces, injecting benign test payloads into filenames and other metadata to detect reflected or stored XSS behavior.
  • Policy enforcement: Establish coding guidelines that mandate use of escaping helpers in templates and prohibit innerHTML-style assignments with raw data. Continuous integration checks can scan for banned functions or unsafe patterns.
  • Runtime monitoring: Leverage browser security reports (e.g., CSP violation reports if CSP is used) or application logs to detect anomalies that might indicate attempted XSS exploitation.

Sources

SourceLink
github.comgithub.com/ci4-cms-erp/ci4ms/releases/tag/0.31.5.0
github.comgithub.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-qxpq-82f3-xj47

Frequently asked

questions

Yes, but typically in two stages. An attacker must first get a crafted SQL backup file or its filename metadata processed by the CI4MS backup module. Once stored, any remote interaction by an admin or privileged user with the malicious backup entry can trigger script execution in their browser.

The attacker needs a way to influence or supply a backup file consumed by the application, which might be through compromised upload channels, insider access, or chained issues in other parts of the system. Exploitation of the XSS itself does not require the attacker to be logged in as the victim; it requires the victim to view the tainted backup entry while authenticated.

The most robust fix is to ensure that any filename or metadata displayed in the UI is strictly validated and contextually encoded before rendering, using established escaping helpers provided by the framework. Additionally, narrow the allowed filename character set and treat all backup-derived data as untrusted throughout its lifecycle.

Adopt a secure-by-default templating approach where output escaping is automatic, enforce coding standards that forbid inserting raw untrusted data into the DOM, and integrate security testing (both SAST and DAST) into the development pipeline. Regular security-focused code reviews for admin and import/backup modules can help catch XSS patterns before release.

Find out what's already
exploitable in your codebase.