CVE-2026-40497: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in freescout-help-desk freescout
FreeScout versions prior to 1. 8. 213 contain a cross-site scripting (XSS) vulnerability due to improper sanitization of the mailbox signature field. The vulnerability arises because the sanitization function removes certain dangerous tags but does not remove <style> tags, allowing CSS injection. An attacker with mailbox settings access can inject CSS that exfiltrates CSRF tokens from other agents or admins viewing the mailbox, enabling privilege escalation. This issue is a partial regression of a previous fix and is addressed in version 1. 8. 213.
AI Analysis
Technical Summary
CVE-2026-40497 is a high-severity cross-site scripting vulnerability in FreeScout help desk software versions before 1.8.213. The vulnerability stems from the Helper::stripDangerousTags() function, which removes script, form, iframe, and object tags but fails to strip <style> tags from the mailbox signature field. Because the mailbox signature is saved and later rendered unescaped in conversation views, and the Content Security Policy allows unsafe inline styles, an attacker with mailbox settings access can inject CSS attribute selectors that exfiltrate CSRF tokens from other users viewing the mailbox. With these tokens, the attacker can perform privileged actions, including creating admin accounts or changing credentials, effectively escalating privileges from agent to admin. The issue is a result of an incomplete fix for a prior XSS vulnerability (GHSA-jqjf-f566-485j). The vulnerability is fixed in FreeScout version 1.8.213.
Potential Impact
An attacker with agent-level mailbox settings permissions can exploit this vulnerability to inject malicious CSS that steals CSRF tokens from administrators or other agents viewing mailbox conversations. This enables the attacker to perform unauthorized state-changing actions with elevated privileges, such as creating admin accounts or modifying credentials, leading to privilege escalation. The vulnerability does not impact availability but has high confidentiality and integrity impacts.
Mitigation Recommendations
Upgrade FreeScout to version 1.8.213 or later, which contains the updated fix that properly addresses the incomplete sanitization of the mailbox signature field. Until upgraded, restrict mailbox settings access to trusted users only, as exploitation requires such permissions. Patch status is not explicitly stated in the advisory fields, but the description confirms version 1.8.213 contains the fix.
CVE-2026-40497: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in freescout-help-desk freescout
Description
FreeScout versions prior to 1. 8. 213 contain a cross-site scripting (XSS) vulnerability due to improper sanitization of the mailbox signature field. The vulnerability arises because the sanitization function removes certain dangerous tags but does not remove <style> tags, allowing CSS injection. An attacker with mailbox settings access can inject CSS that exfiltrates CSRF tokens from other agents or admins viewing the mailbox, enabling privilege escalation. This issue is a partial regression of a previous fix and is addressed in version 1. 8. 213.
CVSS v3.1
Score 8.1high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-40497 is a high-severity cross-site scripting vulnerability in FreeScout help desk software versions before 1.8.213. The vulnerability stems from the Helper::stripDangerousTags() function, which removes script, form, iframe, and object tags but fails to strip <style> tags from the mailbox signature field. Because the mailbox signature is saved and later rendered unescaped in conversation views, and the Content Security Policy allows unsafe inline styles, an attacker with mailbox settings access can inject CSS attribute selectors that exfiltrate CSRF tokens from other users viewing the mailbox. With these tokens, the attacker can perform privileged actions, including creating admin accounts or changing credentials, effectively escalating privileges from agent to admin. The issue is a result of an incomplete fix for a prior XSS vulnerability (GHSA-jqjf-f566-485j). The vulnerability is fixed in FreeScout version 1.8.213.
Potential Impact
An attacker with agent-level mailbox settings permissions can exploit this vulnerability to inject malicious CSS that steals CSRF tokens from administrators or other agents viewing mailbox conversations. This enables the attacker to perform unauthorized state-changing actions with elevated privileges, such as creating admin accounts or modifying credentials, leading to privilege escalation. The vulnerability does not impact availability but has high confidentiality and integrity impacts.
Mitigation Recommendations
Upgrade FreeScout to version 1.8.213 or later, which contains the updated fix that properly addresses the incomplete sanitization of the mailbox signature field. Until upgraded, restrict mailbox settings access to trusted users only, as exploitation requires such permissions. Patch status is not explicitly stated in the advisory fields, but the description confirms version 1.8.213 contains the fix.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-13T19:50:42.115Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e6e4ee19fe3cd2cd6b0ea3
Added to database: 4/21/2026, 2:46:06 AM
Last enriched: 4/28/2026, 6:07:35 AM
Last updated: 6/3/2026, 8:10:58 PM
Views: 97
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.