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-2024-39772 Overview
CVE-2024-39772 affects Mattermost Desktop App versions <=5.8.0. The application fails to safeguard screen capture functionality, allowing an attacker to silently capture high-quality screenshots through JavaScript APIs. The flaw is categorized under [CWE-284] Improper Access Control and is exploitable over the network without authentication or user interaction.
Critical Impact
Attackers can silently exfiltrate on-screen content from Mattermost Desktop users, exposing sensitive conversations, credentials, and documents displayed on the victim's screen.
Affected Products
- Mattermost Desktop App versions <=5.8.0
- Windows, macOS, and Linux desktop clients built on the affected Electron shell
- Deployments that render untrusted web content inside the desktop client
Discovery Timeline
- 2024-09-16 - CVE-2024-39772 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-39772
Vulnerability Analysis
The Mattermost Desktop App is built on Electron, which exposes browser-level JavaScript APIs such as navigator.mediaDevices.getDisplayMedia() and the related getUserMedia() interface. These APIs can request access to display surfaces, including the full desktop, application windows, and browser tabs.
In versions at or below 5.8.0, the application does not enforce an access control boundary around these screen capture entry points. Scripted content running inside the client can invoke the capture APIs and receive a high-resolution video stream without an explicit user approval prompt. The result is an information disclosure condition where visual content on the victim's screen leaves the trust boundary of the desktop application.
The scope of exposed data depends on what the victim has displayed. Captured frames can include direct messages, authentication tokens, multi-factor codes, email, and documents visible in other windows.
Root Cause
The root cause is improper access control [CWE-284] on Electron's desktopCapturer and getDisplayMedia surfaces. The desktop client does not interpose a permission handler that requires user consent before granting a capture source to the renderer process.
Attack Vector
An attacker delivers JavaScript to the desktop client, for example through a malicious channel integration, embedded iframe, or compromised plugin surface. The script calls the screen capture API, receives the resulting MediaStream, encodes frames, and uploads them to an attacker-controlled endpoint. No visible UI prompt alerts the user that capture is active.
See the Mattermost Security Updates advisory for additional technical context.
Detection Methods for CVE-2024-39772
Indicators of Compromise
- Mattermost Desktop processes establishing outbound connections to domains outside the organization's Mattermost server allowlist
- Unexpected use of the desktopCapturer module or getDisplayMedia calls originating from embedded plugin or integration content
- Sustained high-bandwidth uploads from the Mattermost Desktop process to a single remote endpoint
Detection Strategies
- Inventory installed Mattermost Desktop versions across the fleet and flag any instance at or below 5.8.0
- Monitor process behavior for the Mattermost client making GPU or display composition calls uncorrelated with user-initiated screen share actions
- Review Mattermost audit logs for installation or enablement of unapproved plugins and integrations that can inject JavaScript
Monitoring Recommendations
- Alert on outbound TLS sessions from the Mattermost Desktop process to non-corporate destinations
- Baseline normal network volume for the client and alert on sustained upload anomalies consistent with video streaming
- Correlate endpoint telemetry with Mattermost server logs to identify renderer sessions requesting media devices
How to Mitigate CVE-2024-39772
Immediate Actions Required
- Upgrade all Mattermost Desktop App installations to a version above 5.8.0 as published in the vendor security updates
- Audit and remove untrusted Mattermost plugins, integrations, and iframe embeds that can execute arbitrary JavaScript
- Restrict desktop client installation to packages distributed through managed software deployment channels
Patch Information
Mattermost has published fixes through its security update channel. Review the Mattermost Security Updates page for the fixed version corresponding to CVE-2024-39772 and deploy it across all endpoints running the desktop client.
Workarounds
- Where immediate patching is not possible, direct users to the Mattermost web client in a hardened browser rather than the vulnerable desktop app
- Enforce strict integration and plugin allowlists on the Mattermost server to limit the JavaScript surface exposed to the client
- Apply operating-system level screen capture restrictions, such as macOS Screen Recording permissions, to require explicit per-application consent
# Verify installed Mattermost Desktop version on endpoints
# Windows (PowerShell)
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object { $_.DisplayName -like 'Mattermost*' } |
Select-Object DisplayName, DisplayVersion
# macOS
/usr/bin/defaults read /Applications/Mattermost.app/Contents/Info CFBundleShortVersionString
# Linux (Debian/Ubuntu)
dpkg -l | grep -i mattermost-desktop
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

