{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40497 exists.","fix":"No fix has been published for CVE-2026-40497 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-40497 is a high-severity cross-site scripting vulnerability in freescout-help-desk freescout, published on 21 Apr 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-40497 and fix it if it is affected.\n\nWhat it is: CVE-2026-40497 is a high-severity cross-site scripting vulnerability in freescout-help-desk freescout, published on 21 Apr 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40497 exists.\n\nAffected product: freescout-help-desk freescout. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40497/ (Markdown: https://insights.sbomify.com/CVE-2026-40497/index.md)","id":"CVE-2026-40497","markdown":"https://insights.sbomify.com/CVE-2026-40497/index.md","name":"CVE-2026-40497","record":{"aliases":["GHSA-fh99-wr77-pxq3"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["privilege_escalation","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"FreeScout help desk","requires_auth":"high_privilege","summary":"Attackers can inject CSS to steal CSRF tokens, enabling privilege escalation from agent to admin in FreeScout help desk.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"freescout","vendor":"freescout"}],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"FreeScout is a free self-hosted help desk and shared mailbox. Prior to version 1.8.213, FreeScout's `Helper::stripDangerousTags()` removes `\u003cscript\u003e`, `\u003cform\u003e`, `\u003ciframe\u003e`, `\u003cobject\u003e` but does NOT strip `\u003cstyle\u003e` tags. The mailbox signature field is saved via POST /mailbox/settings/{id} and later rendered unescaped via `{!! $conversation-\u003egetSignatureProcessed([], true) !!}` in conversation views. CSP allows `style-src * 'self' 'unsafe-inline'`, so injected inline styles execute freely. An attacker with access to mailbox settings (admin or agent with mailbox permission) can inject CSS attribute selectors to exfiltrate the CSRF token of any agent/admin who views a conversation in that mailbox. With the CSRF token, the attacker can perform any state-changing action as the victim (create admin accounts, change email/password, etc.) — privilege escalation from agent to admin. This is the result of an incomplete fix of GHSA-jqjf-f566-485j. That advisory reported XSS via mailbox signature. The fix applied `Helper::stripDangerousTags()` to the signature before saving. However, `stripDangerousTags()` only removes `script`, `form`, `iframe`, and `object` tags — it does NOT strip `\u003cstyle\u003e` tags, leaving CSS injection possible. Version 1.8.213 contains an updated fix.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"FreeScout Vulnerable to CSS Injection via Stored Style Tag in Mailbox Signature (CSRF Token Exfiltration)","id":"CVE-2026-40497","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"xss","year":"2026"},"n_packages":0,"n_references":3,"next":{"headline":"FreeScout has Authentication Bypass and Information Disclosure in SystemController via /system/cron","id":"CVE-2026-40498"},"packages":[],"prev":{"headline":"FreeScout has Predictable Attachment Token that Allows Unauthenticated Private File Download via Brute Force","id":"CVE-2026-40496"},"products":["freescout"],"published":"2026-04-21","related":[{"cvss_score":10,"headline":"FreeScout 1.8.206 Patch Bypass for CVE-2026-27636 via Zero-Width Space Character Leads to Remote Code Execution","id":"CVE-2026-28289","kev_date_added":null,"published":"2026-03-03"},{"cvss_score":9.8,"headline":"FreeScout's Predictable Authentication Token Enables Account Takeover","id":"CVE-2026-27637","kev_date_added":null,"published":"2026-02-25"},{"cvss_score":9.3,"headline":"FreeScout: Stored XSS via Unescaped Email Template Rendering ({!! $thread-\u003ebody !!})","id":"CVE-2026-32754","kev_date_added":null,"published":"2026-03-19"},{"cvss_score":9.1,"headline":"FreeScout OS Command Injection vulnerability","id":"CVE-2024-29185","kev_date_added":null,"published":"2024-03-22"},{"cvss_score":8.9,"headline":"FreeScout has Authentication Bypass and Information Disclosure in SystemController via /system/cron","id":"CVE-2026-40498","kev_date_added":null,"published":"2026-04-21"},{"cvss_score":8.8,"headline":"FreeScout has Predictable Attachment Token that Allows Unauthenticated Private File Download via Brute Force","id":"CVE-2026-40496","kev_date_added":null,"published":"2026-04-21"},{"cvss_score":8.8,"headline":"FreeScout: Missing .htaccess in Restricted File Extensions Allows Remote Code Execution on Apache","id":"CVE-2026-27636","kev_date_added":null,"published":"2026-02-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-21","vendors":["freescout-help-desk"]},"summary":"Attackers can inject CSS to steal CSRF tokens, enabling privilege escalation from agent to admin in FreeScout help desk.","url":"https://insights.sbomify.com/CVE-2026-40497/"}