/

CVE-2026-44977

Severity:

CRITICAL RISK

(9.0)

Stored XSS (CWE-79) in Countly Star-Rating Plugin Component

CVE-2026-44977

Awaiting Analysis

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Authenticated Session Compromise

Severity:

CRITICAL RISK

(9.0)

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's star-rating plugin stores attacker-controlled feedback files while trusting the submitted MIME type and later serves them from a public preview path. A non-global application administrator may exploit this to deliver active content that executes when a global administrator opens the preview, potentially exposing authenticated session capabilities.

Countly's star-rating plugin stores attacker-controlled feedback files while trusting the submitted MIME type and later serves them from a public preview path. A non-global application administrator may exploit this to deliver active content that executes when a global administrator opens the preview, potentially exposing authenticated session capabilities.

Affected context

The issue occurs in Countly deployments using the star-rating plugin when feedback files can be uploaded by a non-global application administrator and later previewed by a global administrator. Risk increases when uploaded content is publicly reachable and the response Content-Type is derived from attacker-controlled metadata, allowing browsers to interpret the stored file as executable content in the Countly origin.

The issue occurs in Countly deployments using the star-rating plugin when feedback files can be uploaded by a non-global application administrator and later previewed by a global administrator. Risk increases when uploaded content is publicly reachable and the response Content-Type is derived from attacker-controlled metadata, allowing browsers to interpret the stored file as executable content in the Countly origin.

Exploit preconditions

  • Attack surface: The star-rating plugin's feedback file upload and preview functionality
  • Required access: An authenticated non-global application administrator able to submit feedback files
  • Trigger point: A global administrator opens the resulting feedback preview
  • Why exploitation is possible: The application stores active content and reflects an attacker-influenced MIME type when serving it, allowing the browser to execute content within the trusted Countly origin
  • Attack surface: The star-rating plugin's feedback file upload and preview functionality
  • Required access: An authenticated non-global application administrator able to submit feedback files
  • Trigger point: A global administrator opens the resulting feedback preview
  • Why exploitation is possible: The application stores active content and reflects an attacker-influenced MIME type when serving it, allowing the browser to execute content within the trusted Countly origin

Why this happens

The vulnerability results from treating uploaded content as passive data while trusting client-influenced MIME metadata. The preview endpoint serves the stored content with a browser-interpretable Content-Type, creating a persistent script execution path when a privileged user views it. This is a stored cross-site scripting condition mapped to CWE-79, because attacker-controlled content is returned in a context where the browser can execute it as script.

The vulnerability results from treating uploaded content as passive data while trusting client-influenced MIME metadata. The preview endpoint serves the stored content with a browser-interpretable Content-Type, creating a persistent script execution path when a privileged user views it. This is a stored cross-site scripting condition mapped to CWE-79, because attacker-controlled content is returned in a context where the browser can execute it as script.

Potential impact

  • A malicious user may execute script in a global administrator's Countly session
  • Attackers could access authenticated session capabilities exposed to browser-side code
  • Session-related values such as authentication or CSRF tokens could be disclosed
  • The issue may enable unauthorized administrative actions or account compromise
  • Sensitive application data could be accessed or altered through the victim's privileges
  • A malicious user may execute script in a global administrator's Countly session
  • Attackers could access authenticated session capabilities exposed to browser-side code
  • Session-related values such as authentication or CSRF tokens could be disclosed
  • The issue may enable unauthorized administrative actions or account compromise
  • Sensitive application data could be accessed or altered through the victim's privileges

General mitigation guidance

Mitigation generally focuses on treating all uploaded files as untrusted and preventing browsers from interpreting them as active content.

Common defensive patterns include:

  • Validate file type using trusted server-side inspection rather than supplied MIME metadata
  • Restrict uploads to required formats and reject active or script-capable content
  • Serve user-uploaded files from an isolated origin or non-executable download location
  • Apply fixed, safe response headers such as restrictive Content-Type and Content-Disposition values
  • Use context-appropriate output encoding and sanitization for preview features
  • Enforce least privilege for application administrators and limit access to sensitive previews
  • Apply strong Content Security Policy controls and avoid exposing session secrets to script-accessible contexts

Mitigation generally focuses on treating all uploaded files as untrusted and preventing browsers from interpreting them as active content.

Common defensive patterns include:

  • Validate file type using trusted server-side inspection rather than supplied MIME metadata
  • Restrict uploads to required formats and reject active or script-capable content
  • Serve user-uploaded files from an isolated origin or non-executable download location
  • Apply fixed, safe response headers such as restrictive Content-Type and Content-Disposition values
  • Use context-appropriate output encoding and sanitization for preview features
  • Enforce least privilege for application administrators and limit access to sensitive previews
  • Apply strong Content Security Policy controls and avoid exposing session secrets to script-accessible contexts

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying upload handlers that copy client-supplied MIME types into response headers
  • Code review checks for public file-serving endpoints under the primary application origin
  • Tests that upload benign active-content markers and verify they are downloaded or blocked rather than rendered
  • Dynamic scans for persistent content execution when privileged users open uploaded-file previews
  • Policy enforcement requiring isolated origins, safe headers, and allowlisted file formats for user uploads
  • Audit-log review for unusual feedback uploads followed by administrator preview access

Organizations can look for this class of issue through:

  • Static analysis rules identifying upload handlers that copy client-supplied MIME types into response headers
  • Code review checks for public file-serving endpoints under the primary application origin
  • Tests that upload benign active-content markers and verify they are downloaded or blocked rather than rendered
  • Dynamic scans for persistent content execution when privileged users open uploaded-file previews
  • Policy enforcement requiring isolated origins, safe headers, and allowlisted file formats for user uploads
  • Audit-log review for unusual feedback uploads followed by administrator preview access

Sources

SourceLink
github.comgithub.com/Countly/countly-server/commit/ae899f37bc6d70c1b44859756ce80a204ae72631
github.comgithub.com/Countly/countly-server/commit/fcb16c808c0fdb6dc99fe9c66de7fc560b3a9c41
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-jqp4-p86c-phxc

Frequently asked

questions

It can be exploitable through the application's authenticated web interface when an attacker has the required application-administrator access and a privileged administrator later opens the stored preview.

No. The uploader may only need non-global application administrator privileges, while a global administrator's interaction with the preview provides the execution context.

Treat uploaded files as untrusted, allow only necessary non-active formats, validate them server-side, and serve them with fixed safe headers from an isolated or download-only origin.

Review upload and preview workflows for MIME-type trust, enforce safe file-serving policies, use browser security controls such as a restrictive Content Security Policy, and test privileged-user workflows for stored script execution.

It can be exploitable through the application's authenticated web interface when an attacker has the required application-administrator access and a privileged administrator later opens the stored preview.

No. The uploader may only need non-global application administrator privileges, while a global administrator's interaction with the preview provides the execution context.

Treat uploaded files as untrusted, allow only necessary non-active formats, validate them server-side, and serve them with fixed safe headers from an isolated or download-only origin.

Review upload and preview workflows for MIME-type trust, enforce safe file-serving policies, use browser security controls such as a restrictive Content Security Policy, and test privileged-user workflows for stored script execution.

Find out what's already
exploitable in your codebase.