/

CVE-2026-41193

Severity:

CRITICAL RISK

(9.1)

Path Traversal / Directory Traversal in FreeScout Help Desk

CVE-2026-41193

Deferred

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write leading to Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FreeScout's module installation mechanism previously extracted uploaded ZIP archives without validating embedded file paths, enabling directory traversal during extraction.

An authenticated administrator could upload a specially crafted ZIP to write files to arbitrary locations on the server's filesystem, potentially leading to full application compromise.

Affected context

This vulnerability affects FreeScout instances where:

  • The module installation or update feature is enabled in the admin interface.
  • Administrators (or compromised admin accounts) can upload module ZIP files.
  • The server extracts ZIP archives directly to the application or adjacent directories.

The issue manifests during ZIP extraction when file paths inside the archive are not normalized or restricted to the intended module directory, allowing traversal outside that directory if crafted entries are present.

Exploit preconditions

  • Attack surface: Web-based admin interface for module installation/update.
  • Required access: Authenticated administrator account, or an attacker who has compromised such an account.
  • Trigger point: Uploading and installing a specially crafted ZIP module via the module installation feature.
  • Why exploitation is possible: The extraction logic trusts file paths found in the ZIP archive without canonicalization or checks that they remain within the intended modules directory, enabling use of ../ or absolute paths to escape the target directory.

Why this happens

The root cause is an unsafe file extraction pattern where ZIP entry paths are used directly when writing files to disk.

This aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), because user-controlled archive contents can specify paths that break out of the designated module folder.

Without normalizing paths and enforcing that the final resolved location remains inside an allowed directory, attackers can write files to arbitrary locations, such as application directories, configuration locations, or web-accessible paths.

Potential impact

  • An attacker with admin access may write arbitrary files anywhere the application's filesystem permissions allow.
  • Malicious PHP or script files could be planted in web-accessible directories, enabling remote code execution.
  • Application configuration files may be overwritten, potentially leading to authentication bypass or data exfiltration.
  • Log files or security-relevant artifacts could be modified or deleted, hindering incident response and forensics.
  • Local privilege escalation might be possible if sensitive OS or application startup files are writable and altered.

General mitigation guidance

Effective mitigation centers on strictly constraining where files from uploaded archives can be written and reducing the trust placed in archive metadata:

  • Normalize and canonicalize each ZIP entry path before extraction, rejecting any that resolve outside an allowed base directory.
  • Strip or reject paths containing traversal sequences (e.g., ../) or absolute paths, and allow only relative, clean filenames inside a known module root.
  • Use a whitelist-based mapping between logical module entries and filesystem paths rather than writing directly from archive paths.
  • Run the application under a non-privileged account with minimal filesystem write permissions, especially outside designated upload/module directories.
  • Separate writable directories from executable code directories, so even if arbitrary files are written, they cannot be executed as server-side code.
  • Include secure handling of uploaded archives in code review standards and internal frameworks so that future extraction logic follows the same defensive pattern.

How teams detect issues like this

Detection typically involves both code-level and operational strategies:

  • Static analysis: Define rules or patterns to flag uses of archive extraction APIs that write files using unvalidated entry paths, especially when combined with user-uploaded content.
  • Code review: Look for ZIP or archive handling in module or plugin systems and verify that each extracted path is canonicalized and checked against an allowed base directory.
  • Security testing: Perform manual or automated tests by uploading crafted ZIPs containing ../ or absolute paths and confirm they are rejected or sanitized.
  • Runtime monitoring: Monitor server logs and file integrity in application directories for unexpected file creations or modifications following module installations.
  • CI/CD policies: Integrate automated checks or linters to detect unsafe file extraction patterns before deployments, optionally using SAST or secure code scanning tools.

Sources

SourceLink
github.comgithub.com/freescout-help-desk/freescout/commit/14f17a5cd22d217103a72b431b47b1f06996227b
github.comgithub.com/freescout-help-desk/freescout/releases/tag/1.8.215
github.comgithub.com/freescout-help-desk/freescout/security/advisories/GHSA-r85m-5mc9-cc9w

Frequently asked

questions

Yes, but only via the administrative interface. An attacker must either be a legitimate FreeScout admin or compromise an admin account to upload a malicious module ZIP, after which arbitrary file writes may be possible.

Exploitation requires authenticated administrator privileges or equivalent control of an admin session. Regular users or unauthenticated attackers cannot directly exploit this path traversal issue through the module installation feature.

The safest approach is to normalize and verify every ZIP entry path before extraction and ensure it remains within a predefined base directory, rejecting or ignoring any path that attempts traversal or uses an absolute path. Complement this by restricting filesystem write permissions and segregating executable code from writable directories.

Standardize secure archive-handling utilities in your codebase that enforce path normalization and directory constraints, require their use for any file extraction logic, and add static analysis and code review checks that flag direct file writes from user-controlled paths. Combining these patterns with least-privilege filesystem permissions and regular security testing helps prevent recurrence.

Find out what's already
exploitable in your codebase.