CVE-2026-40496
Received Received - Intake
Predictable Token Vulnerability in FreeScout Enables Unauthorized Attachment Access

Publication date: 2026-04-21

Last updated on: 2026-04-23

Assigner: GitHub, Inc.

Description
FreeScout is a free self-hosted help desk and shared mailbox. Prior to version 1.8.213, attachment download tokens are generated using a weak and predictable formula: `md5(APP_KEY + attachment_id + size)`. Since attachment_id is sequential and size can be brute-forced in a small range, an unauthenticated attacker can forge valid tokens and download any private attachment without credentials. Version 1.8.213 fixes the issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-21
Last Modified
2026-04-23
Generated
2026-05-07
AI Q&A
2026-04-21
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
freescout freescout to 1.8.213 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-330 The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.
CWE-340 The product uses a scheme that generates numbers or identifiers that are more predictable than required.
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by attempting to brute force attachment download tokens using the known weak token generation method. Specifically, tokens are generated as md5(APP_KEY + attachment_id + size), where attachment_id is sequential and size can be brute-forced in a small range.

A detection approach involves scripting requests to the attachment download endpoint with guessed tokens and checking for HTTP 200 responses indicating valid tokens.

  • Select a target attachment ID (e.g., 1).
  • Brute force the size parameter within a feasible range (e.g., 1 to ~50,000).
  • For each size, compute the token as md5(APP_KEY + id + size).
  • Send a GET request to /storage/attachment/{dir}/{file}?id={id}&token={token}.
  • If the server responds with HTTP 200, the token is valid and the attachment is accessible without authentication.

A proof-of-concept Python script demonstrating this brute force attack is available in the advisory, which can be adapted for detection purposes.


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation step is to upgrade FreeScout to version 1.8.213 or later, which fixes the vulnerability by replacing the insecure MD5 token generation with a secure SHA-256 HMAC-based token generation method.

This update also includes database schema changes and improved authorization logic to prevent unauthorized attachment downloads.

If upgrading immediately is not possible, consider restricting access to the attachment download endpoints at the network or application firewall level to prevent unauthenticated access.

Additionally, review and apply any security advisories related to FreeScout to ensure all relevant fixes and security improvements are in place.


Can you explain this vulnerability to me?

CVE-2026-40496 is a vulnerability in FreeScout, a self-hosted help desk system, affecting versions prior to 1.8.213. The issue lies in how attachment download tokens are generated using a weak and predictable method. Specifically, tokens are created by computing an MD5 hash of the concatenation of the application key (APP_KEY), the sequential attachment ID, and the attachment size.

Because attachment IDs are sequential and the size can be brute-forced within a small range, an unauthenticated attacker can guess valid tokens and download any private attachment without needing credentials.

The vulnerability arises from the use of MD5, which is cryptographically broken and predictable, combined with insufficient entropy in token generation. This allows brute force attacks to succeed in retrieving private files.

The issue was fixed in version 1.8.213 by replacing the MD5-based token generation with a more secure HMAC-SHA256 method that includes additional unpredictable data such as the file name.


How can this vulnerability impact me? :

This vulnerability allows an unauthenticated attacker to download any private attachment stored in the FreeScout system without needing any credentials.

Since attachment IDs are sequential and sizes can be brute-forced, attackers can generate valid download tokens by brute force and access sensitive or confidential files.

The impact is severe because it leads to a full breach of email attachment confidentiality, potentially exposing private customer data and internal communications.

This can result in data leaks, loss of trust, and significant security and privacy risks for organizations using vulnerable versions of FreeScout.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability can lead to unauthorized access and disclosure of private attachments, which may contain personal or sensitive information.

Such unauthorized data exposure can result in violations of data protection regulations like GDPR and HIPAA, which require strict controls over access to personal and health-related information.

Organizations affected by this vulnerability risk non-compliance penalties, legal consequences, and damage to reputation due to the breach of confidentiality and failure to protect sensitive data.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart