⚠ Replicated advisory. This post reproduces an advisory originally researched and published under the CVE Hunters. It is republished here for reference. The original disclosure followed coordinated vulnerability disclosure and the rules of the CVE Program.

🔗 Original advisory: https://www.cvehunters.com/p/cve-2025-9823/
📋 CVE record: CVE-2025-9823

CVE Publication: https://www.cve.org/CVERecord?id=CVE-2025-9823

Vendor

Mautic is an open-source marketing automation platform used worldwide.

https://mautic.org/

Affected Product Code Base

Affected versions:

= 4.4.0, < 4.4.17 = 5.0.0-alpha, < 5.2.8 = 6.0.0-alpha, < 6.0.5 Patched versions: 4.4.17, 5.2.8, 6.0.5

Vulnerability Description

A Cross-Site Scripting (XSS) vulnerability allows an attacker to execute arbitrary JavaScript in the context of another user’s session. This occurs because user-supplied input is reflected back in the server’s response without proper sanitization or escaping, potentially enabling malicious actions such as session hijacking, credential theft, or unauthorized actions in the application.

Details

The vulnerability resides in the “Tags” input field on the /s/ajax?action=lead:addLeadTags endpoint. When a user inputs a malicious payload, such as:

"><script>alert('XSS')</script>

the application reflects this input directly in the response. Although the server applies sanitization before storing the data or returning it later, the payload is executed immediately in the victim’s browser upon reflection, allowing an attacker to run arbitrary JavaScript in the user’s session.

Patches

This vulnerability has been patched in Mautic 7.0.0-beta1 and later versions. The fix modifies the chosen-js patch to use jQuery’s .text() method instead of string concatenation, preventing XSS attacks when adding new tag options to the DOM.

Technical Details

The vulnerability was caused by unsafe manipulation in the chosen-js patch:

Vulnerable code:

$(this.form_field).append('<option>' + newTag + '</option>');

Fixed code:

$(this.form_field).append($('<option></option>').text(newTag));

The fix ensures that user input is properly escaped when creating elements, preventing XSS injection.

Impact

A Reflected XSS attack can have a significant impact, allowing attackers to steal sensitive user data like cookies, redirect users to malicious websites, manipulate the web page content, and essentially take control of a user’s session within an application by executing malicious JavaScript code within the victim’s browser, even if the server-side code is secure; essentially enabling them to perform actions as if they were the logged-in user.

Reference

GHSA-9v8p-m85m-f7mm

CVE-2025-22132

Discoverer

Natan Maia Morette

By: CVE-Hunters