Skip to main content
Vulnerability Database/CVE-2026-41582

CVE-2026-41582: Countly Server Path Traversal Vulnerability

CVE-2026-41582 is a path traversal vulnerability in Countly Server that allows unauthenticated attackers to access arbitrary files on the server. This post covers the technical details, affected versions, and remediation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-41582 Overview

CVE-2026-41582 is a path traversal vulnerability [CWE-22] in Countly Server, the server-side component of the Countly product analytics platform. The flaw affects versions prior to 24.05.50 and 25.03.44. Public image and screenshot routes concatenate attacker-controlled wildcard paths without containment validation. On deployments using the local filesystem backend, an unauthenticated attacker can traverse outside the intended asset directories. The request path reaches getStats or getStream in api/utils/countlyFs.js, disclosing arbitrary readable files on the server.

Critical Impact

Unauthenticated remote attackers can read arbitrary files accessible to the Countly process on local-filesystem deployments, exposing configuration files, credentials, and application source code.

Affected Products

  • Countly Server versions prior to 24.05.50 (LTS branch)
  • Countly Server versions prior to 25.03.44 (current branch)
  • Deployments configured with the local filesystem backend for asset storage

Discovery Timeline

  • 2026-10-16 - CVE-2026-41582 published to the National Vulnerability Database
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-41582

Vulnerability Analysis

The vulnerability resides in the public static asset routes implemented in frontend/express/app.js, plugins/star-rating/frontend/app.js, and plugins/dashboards/frontend/app.js. These routes expose wildcard paths including /appimages/*, /memberimages/*, */screenshots/*, /star-rating/images/*, and /dashboards/images/screenshots/*. Each route takes the wildcard segment from the incoming request and concatenates it with a base asset directory. The resulting path is then passed to countlyFs.getStats or countlyFs.getStream for retrieval.

Because the routes require no authentication, any network-reachable attacker can issue crafted GET requests. Sequences such as ../../../../etc/passwd escape the intended asset directory. On deployments that use the local filesystem backend, the file is read directly from disk and returned in the HTTP response.

Root Cause

The routes failed to canonicalize the resolved path and verify that it remains within the designated base directory. The fix introduces a safeStaticPath helper that resolves both the base directory and the user-supplied path using path.resolve, then confirms the resolved path either equals the base directory or begins with the base directory followed by path.sep.

Attack Vector

An unauthenticated attacker sends an HTTP GET request to one of the vulnerable wildcard endpoints with directory traversal sequences in the path component. The Countly application concatenates the traversal string with the asset base directory, resolves it against the filesystem, and returns the contents of any file readable by the Node.js process.

javascript
// Security patch in frontend/express/app.js - containment helper
     { validateCreate } = require('../../api/utils/rights.js'),
     tracker = require('../../api/parts/mgmt/tracker.js');
 
+/**
+ * Resolve a request path under a static base directory.
+ * @param {string} baseDir - base static directory
+ * @param {string} requestPath - user-supplied request path
+ * @returns {string|null} contained path or null
+ */
+function safeStaticPath(baseDir, requestPath) {
+    baseDir = path.resolve(baseDir);
+    requestPath = (requestPath + "").replace(/\\/g, "/");
+    while (requestPath.indexOf("/") === 0) {
+        requestPath = requestPath.substring(1);
+    }
+    var resolvedPath = path.resolve(baseDir, requestPath);
+    if (resolvedPath === baseDir || resolvedPath.indexOf(baseDir + path.sep) === 0) {
+        return resolvedPath;
+    }
+    return null;
+}

Source: Countly Server Commit 405cb229. The patch rejects any resolved path that escapes baseDir, returning null and preventing the subsequent filesystem read.

Detection Methods for CVE-2026-41582

Indicators of Compromise

  • HTTP GET requests to /appimages/, /memberimages/, /screenshots/, /star-rating/images/, or /dashboards/images/screenshots/ paths containing ../ or URL-encoded equivalents such as %2e%2e%2f.
  • Access log entries showing successful 200 responses for the above endpoints with unusual payload sizes or non-image content types.
  • Outbound reads of sensitive files such as /etc/passwd, .env, or Countly configuration files appearing in process-level file access telemetry.

Detection Strategies

  • Deploy web application firewall rules that inspect wildcard URL segments for traversal sequences and encoded variants before the request reaches Countly.
  • Correlate reverse-proxy access logs with Node.js process file-open events to identify requests that triggered reads outside the configured asset directories.
  • Hunt for anomalous response sizes on image routes, since legitimate image responses have predictable binary signatures.

Monitoring Recommendations

  • Enable verbose request logging on the Countly frontend and forward logs to a centralized analytics platform for traversal pattern matching.
  • Monitor file integrity on sensitive host paths and alert on reads from the Countly service account outside expected directories.
  • Track egress traffic volume from the Countly host for sudden spikes consistent with bulk file enumeration.

How to Mitigate CVE-2026-41582

Immediate Actions Required

  • Upgrade Countly Server to version 24.05.50 on the LTS branch or 25.03.44 on the current branch without delay.
  • Audit historical access logs for the affected wildcard routes and identify any requests containing traversal sequences.
  • Rotate any credentials, API keys, or secrets stored on the Countly host that could have been exposed through arbitrary file read.

Patch Information

The maintainers fixed the issue in Countly Server release 24.05.50 and Countly Server release 25.03.44. The underlying code changes are documented in commit 405cb229 and commit 8004d29d. Full technical details are available in GitHub Security Advisory GHSA-fqgp-6rm9-8696.

Workarounds

  • Place a reverse proxy in front of Countly that rejects requests to the affected routes containing .., %2e%2e, backslashes, or absolute path prefixes.
  • Switch asset storage from the local filesystem backend to an object-storage backend, which the advisory indicates is not affected by the traversal.
  • Restrict the Countly process account to the minimum filesystem permissions required, limiting what an attacker can read if exploitation succeeds.
bash
# Example NGINX rule to block traversal attempts on affected routes
location ~* ^/(appimages|memberimages|star-rating/images|dashboards/images/screenshots)/ {
    if ($request_uri ~* "(\.\./|\.\.%2f|%2e%2e/|%2e%2e%2f|\\)") {
        return 400;
    }
    proxy_pass http://countly_backend;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.