Severity:

HIGH RISK

(7.6)

XSS in Mautic 7 Projects Tags and Popovers

CVE-2026-9809

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting leading to administrative session compromise

Severity:

HIGH RISK

(7.6)

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

Mautic 7's Projects component improperly renders user-controlled project names in tags and popovers on administrative detail views without adequate sanitization, leading to a stored Cross-Site Scripting (XSS) condition.

An authenticated user with project creation or edit permissions can inject malicious scripts that execute whenever an administrator views an affected entity and hovers over a compromised project tag, potentially enabling account takeover, configuration tampering, or data theft.

Affected context

This vulnerability appears in Mautic 7 installations that use the Projects feature and display project tags or popovers in administrative detail views such as campaigns, emails, and forms.

It is relevant when:

  • Users with non-trivial permissions can create or edit projects
  • Project names are treated as displayable labels in the UI
  • The rendering layer outputs project names as HTML without robust escaping or sanitization

In such setups, project names become a cross-trust boundary between lower-privileged users who define labels and higher-privileged administrators who view them.

Exploit preconditions

  • Attack surface: Mautic web UI, specifically administrative detail views that show project tags and hover popovers.
  • Required access: Authenticated account with permission to create or edit projects or otherwise influence project names.
  • Trigger point: An administrator (or another higher-privileged user) loads a view that includes a compromised project tag and hovers or focuses over the tag/popover.
  • Why exploitation is possible: Project names are stored and later rendered into HTML without consistent output encoding or sanitization. Because these values are treated as trusted display content, attacker-controlled script code can be interpreted and executed by the browser in the context of the victim's authenticated session.

Why this happens

The defect stems from treating user-controlled project names as safe HTML instead of untrusted data that must be escaped before rendering.

When building tag labels and popovers for projects, the application directly injects the stored name field into the page markup or associated attributes without context-aware encoding.

This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), where untrusted input is used to construct a web page in a way that allows active content (such as <script> blocks, event handlers, or JavaScript URLs) to execute.

Conceptually, the rendering layer fails to enforce a strict separation between data and code, allowing stored data to become executable script within the browser.

Potential impact

  • Compromise of administrator sessions via execution of arbitrary JavaScript in the victim's browser.
  • Unauthorized administrative actions performed on behalf of the victim (e.g., creating users, changing roles, modifying campaigns).
  • Modification of system configurations, including email or campaign settings.
  • Exfiltration of sensitive data such as contact records, campaign analytics, configuration secrets, or CSRF tokens accessible to the application front end.
  • Lateral movement within the application by leveraging compromised administrator privileges.

General mitigation guidance

Effective mitigation centers on treating all project names and similar user-controllable labels as untrusted and enforcing strict output encoding:

  • Apply context-aware output escaping for project names wherever they are rendered (HTML body, attributes, JavaScript contexts, tooltips, and popovers).
  • Prefer safe templating engines and helper functions that encode by default, requiring explicit opt-out for raw HTML only in well-reviewed cases.
  • Implement centralized utility functions or components for rendering tags and labels that uniformly apply encoding, rather than duplicating logic across views.
  • Restrict the use of HTML within display fields where possible; favor plain text semantics and disallow or strip active content patterns (e.g., <script>, on*= attributes, javascript: URLs).
  • Enforce least privilege for users who can create or edit projects, so fewer accounts can introduce malicious labels even if XSS pathways exist.
  • Consider applying Content Security Policy (CSP) in a way that reduces the impact of XSS, such as disallowing inline scripts and restricting script sources, while recognizing that CSP is a defense-in-depth measure and not a substitute for proper encoding.

How teams detect issues like this

Organizations can identify and monitor for similar vulnerabilities through a combination of review and tooling:

  • Static code analysis: Search for template expressions or view code paths that inject project names or similar user data into HTML without using standardized encoding helpers.
  • Template and component review: Examine shared UI components for tags, badges, or popovers to ensure they consistently call safe rendering utilities instead of embedding raw values.
  • Security-focused code review checklists: Incorporate XSS-specific questions into review processes, e.g., "Is this user-controlled value HTML-encoded for the context where it appears?"
  • Automated scanning: Use web application security scanners to exercise Mautic UI flows that involve project creation and project-tagged entities, watching for reflected or stored script execution.
  • Policy and linting: Introduce lint rules or framework-level policies that discourage direct insertion of raw variables into dangerous contexts (like innerHTML, inline event handlers, or data-* attributes processed as HTML).

Sources

SourceLink
github.comgithub.com/mautic/mautic/security/advisories/GHSA-7h65-whp7-rgqf

Frequently asked

questions

Yes, but it requires an attacker to first obtain or abuse an authenticated account with permissions to create or edit projects. Once malicious project names are stored, any administrator who views affected entities and hovers over the compromised tag can trigger script execution.

The attacker must be able to authenticate to the Mautic instance and have sufficient permissions to create or modify projects, or otherwise control project names. Public, unauthenticated users cannot directly exploit this flaw unless the environment is configured to grant such privileges.

Implement consistent, context-aware output encoding for all user-controlled fields, including project names, at the point where they are rendered. Centralize tag and popover rendering through shared components that always escape values, and avoid rendering raw HTML from project names or similar labels.

Adopt a secure templating strategy that escapes by default, enforce coding standards that forbid unencoded insertion of user input into HTML, and integrate automated security testing and review for UI features that display user-driven labels. Complement this with least-privilege permission design and, where feasible, a restrictive Content Security Policy to reduce the impact of any remaining XSS flaws.

Find out what's already
exploitable in your codebase.