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-44977 Overview
CVE-2026-44977 is a stored cross-site scripting (XSS) vulnerability [CWE-79] in Countly server, the backend component of the Countly product analytics platform. The flaw resides in the star-rating plugin, where plugins/star-rating/api/api.js exposes an uploadFeedbackFile endpoint that stores attacker-controlled content and trusts the client-supplied MIME type. The companion handler in plugins/star-rating/frontend/app.js later serves that content from feedback/preview/ with the attacker-influenced Content-Type. A non-global application administrator can plant an active payload, and any global administrator who opens the preview executes it inside the Countly origin, exposing auth_token and csrf_token session values. Fixed releases are 24.05.50 and 25.03.44.
Critical Impact
A lower-privileged application administrator can escalate to global administrator by storing an executable payload that steals authenticated session capabilities when previewed.
Affected Products
- Countly countly-server versions prior to 24.05.50
- Countly countly-server versions prior to 25.03.44
- Deployments using the bundled star-rating plugin
Discovery Timeline
- 2026-10-16 - CVE-2026-44977 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-44977
Vulnerability Analysis
The star-rating plugin accepts user feedback attachments through uploadFeedbackFile. The upload path records the file along with the Content-Type string supplied by the uploader rather than deriving it from the file contents. When the frontend route under feedback/preview/ serves that file back, Express replays the stored MIME header verbatim. Browsers therefore render HTML, SVG, or JavaScript responses as active content inside the Countly origin.
Because the preview route is publicly reachable and the target is a global administrator, the attacker gains script execution with the victim's session context. The payload can read auth_token and csrf_token from the authenticated page, then issue API calls that modify application configuration or create new global administrators.
Root Cause
The plugin relied on two assumptions that both fail: that an application-scoped administrator is sufficiently trusted to pick a MIME type, and that stored attachments only contain inert image data. Neither upload-time MIME validation nor response-time sniffing protections were in place, and preview filenames were not constrained to a safe character set.
Attack Vector
Exploitation requires an authenticated application administrator account (PR:L) and user interaction from a global administrator (UI:R) who browses the stored preview. The scope change (S:C) reflects privilege boundary crossing from the application admin role to the global admin role within Countly.
// Patch excerpt: plugins/star-rating/api/image-utils.js
// Server now sniffs magic bytes instead of trusting the stored MIME.
function sniffImageType(buf) {
if (!buf || buf.length < 12) {
return null;
}
// PNG: 89 50 4E 47 0D 0A 1A 0A
if (buf[0] === 0x89 && buf[1] === 0x50 && buf[2] === 0x4E && buf[3] === 0x47
&& buf[4] === 0x0D && buf[5] === 0x0A && buf[6] === 0x1A && buf[7] === 0x0A) {
return 'image/png';
}
// JPEG: FF D8 FF
if (buf[0] === 0xFF && buf[1] === 0xD8 && buf[2] === 0xFF) {
return 'image/jpeg';
}
// GIF87a / GIF89a
if (buf[0] === 0x47 && buf[1] === 0x49 && buf[2] === 0x46 && buf[3] === 0x38
&& (buf[4] === 0x37 || buf[4] === 0x39) && buf[5] === 0x61) {
return 'image/gif';
}
// WebP: "RIFF" .... "WEBP"
if (buf[0] === 0x52 && buf[1] === 0x49 && buf[2] === 0x46 && buf[3] === 0x46
&& buf[8] === 0x57 && buf[9] === 0x45 && buf[10] === 0x42 && buf[11] === 0x50) {
return 'image/webp';
}
}
// Source: https://github.com/Countly/countly-server/commit/ae899f37bc6d70c1b44859756ce80a204ae72631
Detection Methods for CVE-2026-44977
Indicators of Compromise
- HTTP responses from feedback/preview/ carrying non-image Content-Type values such as text/html, image/svg+xml, or application/javascript
- Feedback attachment records whose stored MIME disagrees with the file's magic bytes
- Unexpected creation of new global administrator accounts shortly after a feedback preview was opened
- API calls using an administrator's auth_token originating from browser contexts that previously loaded feedback/preview/
Detection Strategies
- Scan stored feedback attachments on disk and compare the recorded MIME type against a magic-byte inspection of the file contents.
- Review Countly web server access logs for GET requests to feedback/preview/* followed closely by privileged API activity from the same session.
- Alert on administrative changes (new users, role elevations) that correlate temporally with feedback preview requests.
Monitoring Recommendations
- Forward Countly application and reverse-proxy logs to a central analytics platform and retain preview-route traffic for retroactive review.
- Baseline normal feedback upload volume per application and flag spikes or uploads containing unusually large text payloads.
- Monitor for outbound requests from administrator browsers to unknown hosts immediately after feedback/preview/ access, which can indicate token exfiltration.
How to Mitigate CVE-2026-44977
Immediate Actions Required
- Upgrade countly-server to 24.05.50 or 25.03.44 as published in the vendor releases.
- Audit all existing feedback attachments and remove any file whose contents do not match a safe image format.
- Rotate auth_token and csrf_token values for global administrators and invalidate active sessions.
- Review the application administrator roster and revoke accounts that are not strictly required.
Patch Information
The fix lands in commits ae899f3 and fcb16c8. The upload path now derives the MIME type from magic-byte sniffing via image-utils.js, and the preview route enforces a strict filename pattern (/^[a-zA-Z0-9_-]{1,64}$/) that rejects path separators and extensions. See the GitHub Security Advisory GHSA-jqp4-p86c-phxc and the Countly 24.05.50 release or Countly 25.03.44 release for upgrade packages.
Workarounds
- Disable the star-rating plugin in environments where upgrading is not immediately possible.
- Block external access to the feedback/preview/ route at the reverse proxy until the patch is applied.
- Enforce a strict Content Security Policy on the Countly origin to reduce the impact of script execution from stored content.
- Instruct global administrators to avoid opening feedback previews from untrusted application admins until patched.
# Example nginx snippet to block preview access pending patch
location ~* ^/feedback/preview/ {
return 403;
}
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

