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-42269 Overview
CVE-2026-42269 is a path traversal vulnerability [CWE-22] in Countly Server, the backend component of the Countly product analytics platform. The flaw resides in the data migration plugin, where the authenticated deletion route in plugins/data_migration/api/api.js forwards a user-controlled exportid to the clean_up_data function without validating the path. The helper in plugins/data_migration/api/data_migration_helper.js concatenates that identifier into a filesystem path that resolves outside the intended import directory and then calls a recursive remove. An authenticated administrator or any user granted migration permission can delete arbitrary writable files or entire directory trees. Fixed releases are 24.05.50 and 25.03.44.
Critical Impact
Authenticated attackers with migration permission can recursively delete writable files anywhere the Countly process can reach, causing data loss and service disruption.
Affected Products
- Countly Server versions prior to 24.05.50
- Countly Server versions prior to 25.03.44
- Deployments exposing the data migration plugin API
Discovery Timeline
- 2026-10-16 - CVE-2026-42269 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-42269
Vulnerability Analysis
The vulnerability lives in the Countly data migration plugin. The deletion endpoint accepts an exportid parameter from an authenticated client and passes it directly to clean_up_data without canonicalization or allow-list checks. Inside data_migration_helper.js, this identifier is concatenated into a path that is subsequently resolved with Node's path module, then handed to a recursive filesystem removal routine.
Because no boundary check verifies that the resolved path stays within the intended import directory, an attacker can supply traversal sequences such as ../ or absolute path fragments. The remove call then operates outside the plugin's working directory. Any file or directory writable by the Node.js process owner is a valid deletion target, including configuration, logs, and other application data.
The issue is scored CVSS 8.1 (vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H), reflecting high integrity and availability impact with no confidentiality loss.
Root Cause
The root cause is missing filename validation and path containment before invoking a destructive filesystem operation. The identifier flows from an HTTP request through the API layer into the helper without being normalized or checked against the intended base directory.
Attack Vector
An authenticated user with migration permission issues a request to the data migration deletion route. The request includes an exportid crafted with directory traversal sequences. The server resolves the path outside the import directory and recursively removes the target.
// Security patch excerpt — plugins/data_migration/frontend/app.js
// Introduces filename sanitization and base-path containment
countlyConfig = require("../../../frontend/express/config");
const fs = require('fs');
const path = require('path');
const common = require('../../../api/utils/common.js');
/**
* Validate a filename before using it as a path segment.
* @param {string} filename - filename
* @returns {string|null} safe filename or null
*/
function safeFilename(filename) {
filename = filename + "";
if (filename && common.sanitizeFilename(filename) === filename) {
return filename;
}
return null;
}
/**
* Resolve a filename under a base path after filename validation.
* @param {string} basePath - base directory
* @param {string} filename - filename to resolve under base directory
* @returns {string|null} contained path or null
*/
function safePathIn(basePath, filename) {
filename = safeFilename(filename);
if (!filename) {
return null;
}
basePath = path.resolve(basePath);
Source: Countly Server Commit #764e2a1 and Countly Server Commit #b652ee8. The patch adds safeFilename and safePathIn helpers that reject traversal input and enforce that resolved paths stay under the expected base directory.
Detection Methods for CVE-2026-42269
Indicators of Compromise
- HTTP requests to the data migration deletion route containing exportid values with ../, ..\, URL-encoded traversal (%2e%2e%2f), or absolute path fragments.
- Unexpected deletions of files or directories outside the Countly import directory, especially under plugins/data_migration/.
- Node.js process errors referencing missing files immediately after a migration API call.
Detection Strategies
- Audit Countly API access logs for calls to the data migration plugin and correlate the authenticated user, source IP, and exportid payload.
- Enable filesystem auditing (auditd on Linux) on directories containing Countly application files, configuration, and logs to flag unexpected unlink or rmdir operations by the Node.js process.
- Review account privileges and alert on any non-administrator account granted the migration permission.
Monitoring Recommendations
- Centralize Countly application and web server logs and alert on 2xx responses to the data migration deletion endpoint from unexpected principals.
- Monitor service health signals that indicate missing files or sudden plugin failures.
- Track changes to role-permission assignments in Countly to detect privilege expansion that would enable this attack.
How to Mitigate CVE-2026-42269
Immediate Actions Required
- Upgrade Countly Server to version 24.05.50 or 25.03.44, whichever matches your release branch.
- Audit which accounts hold migration permission and revoke it from any account that does not strictly require it.
- Restrict network access to the Countly administrative API to trusted operator networks until patching is complete.
Patch Information
The fix is tracked in GitHub Security Advisory GHSA-5pmc-54j6-jcgq and shipped in Countly Server Release 24.05.50 and Countly Server Release 25.03.44. Technical changes are documented in Countly Server Commit #764e2a1, Countly Server Commit #b652ee8, and the Countly Server Changelog.
Workarounds
- If immediate upgrade is not possible, disable the data_migration plugin in the Countly configuration.
- Remove migration permission from all user roles until the patched version is deployed.
- Run the Countly Node.js process under a dedicated low-privilege user whose write access is limited to the application's required directories.
# Verify installed Countly version and upgrade on a standard deployment
cat /opt/countly/package.json | grep '"version"'
# Pull patched release and restart services
cd /opt/countly
git fetch --tags
git checkout 25.03.44 # or 24.05.50 for the 24.05 branch
npm install --production
systemctl restart countly-api countly-dashboard
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

