/

CVE-2026-41582

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Countly Public Image Routes

CVE-2026-41582

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized Disclosure of Server Files

Severity:

HIGH RISK

(7.5)

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

Countly contains a path traversal vulnerability in several public image and screenshot routes that concatenate attacker-controlled wildcard paths without verifying directory containment. On deployments using the local filesystem backend, an unauthenticated attacker may read arbitrary files accessible to the server process.

Countly contains a path traversal vulnerability in several public image and screenshot routes that concatenate attacker-controlled wildcard paths without verifying directory containment. On deployments using the local filesystem backend, an unauthenticated attacker may read arbitrary files accessible to the server process.

Affected context

The issue occurs in Countly's public asset and screenshot routes when the local filesystem backend is enabled and attacker-controlled wildcard path segments are appended to asset directories without containment validation. Affected routes include /appimages/*, /memberimages/*, */screenshots/*, /star-rating/images/*, and /dashboards/images/screenshots/*. Deployments using other storage backends or additional access controls may have a different exposure profile.

The issue occurs in Countly's public asset and screenshot routes when the local filesystem backend is enabled and attacker-controlled wildcard path segments are appended to asset directories without containment validation. Affected routes include /appimages/*, /memberimages/*, */screenshots/*, /star-rating/images/*, and /dashboards/images/screenshots/*. Deployments using other storage backends or additional access controls may have a different exposure profile.

Exploit preconditions

  • Attack surface: Public HTTP image and screenshot routes
  • Required access: No authentication is generally required to reach the affected routes
  • Trigger point: Processing of attacker-controlled wildcard path segments
  • Backend requirement: The deployment uses Countly's local filesystem storage backend
  • Why exploitation is possible: User-supplied paths are joined with intended asset directories without reliably confirming that the resulting path remains within the permitted directory
  • Attack surface: Public HTTP image and screenshot routes
  • Required access: No authentication is generally required to reach the affected routes
  • Trigger point: Processing of attacker-controlled wildcard path segments
  • Backend requirement: The deployment uses Countly's local filesystem storage backend
  • Why exploitation is possible: User-supplied paths are joined with intended asset directories without reliably confirming that the resulting path remains within the permitted directory

Why this happens

The vulnerability is caused by insufficient path canonicalization and containment checking when constructing filesystem paths from URL wildcard values. The application passes attacker-controlled path components to filesystem access functions such as getStats or getStream without ensuring that the resolved path is confined to the expected asset directory. This is a CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The vulnerability is caused by insufficient path canonicalization and containment checking when constructing filesystem paths from URL wildcard values. The application passes attacker-controlled path components to filesystem access functions such as getStats or getStream without ensuring that the resolved path is confined to the expected asset directory. This is a CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • An unauthenticated attacker may read arbitrary files accessible to the Countly process
  • Sensitive configuration, credentials, or application data could be disclosed
  • Disclosure of source code or operational metadata could facilitate further attacks
  • Exposed files may enable lateral movement or compromise of connected services
  • An unauthenticated attacker may read arbitrary files accessible to the Countly process
  • Sensitive configuration, credentials, or application data could be disclosed
  • Disclosure of source code or operational metadata could facilitate further attacks
  • Exposed files may enable lateral movement or compromise of connected services

General mitigation guidance

Mitigation should focus on enforcing filesystem path containment and reducing trust in URL-derived path values.

  • Resolve candidate paths to canonical form before access and verify they remain beneath the intended base directory
  • Prefer identifier-based asset lookup or a controlled allowlist over direct path composition
  • Reject traversal indicators, encoded separators, absolute paths, and unexpected path formats as defense-in-depth
  • Keep public asset directories separate from secrets, configuration files, and application data
  • Run the service with the minimum filesystem permissions required for its function
  • Use storage backends and serving layers that do not expose arbitrary local filesystem paths

Mitigation should focus on enforcing filesystem path containment and reducing trust in URL-derived path values.

  • Resolve candidate paths to canonical form before access and verify they remain beneath the intended base directory
  • Prefer identifier-based asset lookup or a controlled allowlist over direct path composition
  • Reject traversal indicators, encoded separators, absolute paths, and unexpected path formats as defense-in-depth
  • Keep public asset directories separate from secrets, configuration files, and application data
  • Run the service with the minimum filesystem permissions required for its function
  • Use storage backends and serving layers that do not expose arbitrary local filesystem paths

How teams detect issues like this

Organizations can look for:

  • Static analysis findings where request parameters or wildcard route values flow into filesystem path joins or stream functions
  • Code review signals such as direct concatenation of URL paths with filesystem directories
  • Tests covering encoded traversal sequences, absolute paths, symlinks, and canonicalization edge cases
  • Web application firewall or gateway policies that alert on traversal patterns in public asset routes
  • Runtime monitoring for requests to asset endpoints that produce unusual filesystem access or repeated file-read errors

Automated security review tools may help identify tainted path data reaching file APIs.

Organizations can look for:

  • Static analysis findings where request parameters or wildcard route values flow into filesystem path joins or stream functions
  • Code review signals such as direct concatenation of URL paths with filesystem directories
  • Tests covering encoded traversal sequences, absolute paths, symlinks, and canonicalization edge cases
  • Web application firewall or gateway policies that alert on traversal patterns in public asset routes
  • Runtime monitoring for requests to asset endpoints that produce unusual filesystem access or repeated file-read errors

Automated security review tools may help identify tainted path data reaching file APIs.

Sources

SourceLink
github.comgithub.com/Countly/countly-server/commit/405cb229ed37c744f6d61c42bf86fee5a7ee3530
github.comgithub.com/Countly/countly-server/commit/8004d29d3c789b70a79bf6e0380f0d546dbf42a9
github.comgithub.com/Countly/countly-server/releases/tag/24.05.50
github.comgithub.com/Countly/countly-server/releases/tag/25.03.44
github.comgithub.com/Countly/countly-server/security/advisories/GHSA-fqgp-6rm9-8696

Frequently asked

questions

Yes. On affected deployments using the local filesystem backend, the vulnerable routes are public and exploitation generally does not require authentication.

The attacker needs network access to Countly's exposed image or screenshot routes. They do not generally need an account, but the deployment must use the affected local storage configuration.

Enforce canonical path resolution and verify that every resolved path remains inside its designated asset directory before performing filesystem operations. Prefer controlled asset identifiers instead of accepting arbitrary path fragments.

Use taint analysis and code review for request data reaching file APIs, test encoded and canonicalization edge cases, isolate public assets from sensitive files, and run the service with least-privilege filesystem permissions.

Yes. On affected deployments using the local filesystem backend, the vulnerable routes are public and exploitation generally does not require authentication.

The attacker needs network access to Countly's exposed image or screenshot routes. They do not generally need an account, but the deployment must use the affected local storage configuration.

Enforce canonical path resolution and verify that every resolved path remains inside its designated asset directory before performing filesystem operations. Prefer controlled asset identifiers instead of accepting arbitrary path fragments.

Use taint analysis and code review for request data reaching file APIs, test encoded and canonicalization edge cases, isolate public assets from sensitive files, and run the service with least-privilege filesystem permissions.

Find out what's already
exploitable in your codebase.