How to Fix CVE-2026-1628: Inclusion of functionality from untrusted control sphere in Mattermost
By Sai Kiran Pandrala. Last verified: 2026-05-25.
CVE-2026-1628 is a inclusion of functionality from untrusted control sphere in Mattermost Mattermost. The fix is to upgrade to Mattermost 5.13.4.0.
| Severity | 4.6 (Medium) |
|---|---|
| Actively exploited? | No public listing in CISA KEV |
| Affected | Mattermost 0 to <=5.13.3 |
| Fixed in | Mattermost 5.13.4.0 |
| Type (CWE) | CWE-829: Inclusion of Functionality from Untrusted Control Sphere |
What is CVE-2026-1628?
Mattermost Desktop App versions <=5.13.3 fail to attach listeners restricting navigation to external sites within the Mattermost app which allows a malicious server to expose preload script functionality to untrusted servers via having a user open an external link in their Mattermost server. Mattermost Advisory ID: MMSA-2026-00596 The CVSS base score is 4.6 (Medium). The official advisory is at https://mattermost.com/security-updates.
Am I affected?
Check the version of Mattermost you are running and compare it against the Affected row above (Mattermost 0 to <=5.13.3). If your build sits inside the affected range, you must patch.
Run the version check that fits your platform:
# Linux package check
dpkg -s mattermost 2>/dev/null | grep -i ^Version
rpm -q mattermost 2>/dev/null
command -v mattermost >/dev/null && mattermost --version 2>/dev/null
# Windows (PowerShell)
Get-Package -Name "*Mattermost*" -ErrorAction SilentlyContinue | Select-Object Name, Version
winget list --name "Mattermost" 2>$null
How to fix CVE-2026-1628
Upgrade Mattermost to a patched build: Mattermost 5.13.4.0. The vendor advisory is the source of truth for the exact fixed version.
Ubuntu / Debian
sudo apt-get update
sudo apt-get install --only-upgrade mattermost
dpkg -s mattermost | grep -i ^Version
RHEL / CentOS / Rocky / AlmaLinux
sudo dnf upgrade --refresh mattermost -y
# or for older releases:
sudo yum update mattermost -y
rpm -q mattermost
SUSE / openSUSE
sudo zypper refresh
sudo zypper update mattermost
rpm -q mattermost
Complete PowerShell remediation script (Windows)
# Fix script for CVE-2026-1628 affecting Mattermost
# Run as administrator. Detect -> backup -> upgrade -> verify -> log.
$ErrorActionPreference = "Stop"
$LogPath = "C:\Logs\CVE-2026-1628-fix-$(Get-Date -Format yyyyMMdd-HHmmss).log"
New-Item -ItemType Directory -Force (Split-Path $LogPath) | Out-Null
Start-Transcript -Path $LogPath -Append
try {
Write-Host "[1/4] Detect installed version"
$pkg = Get-Package -Name "*Mattermost*" -ErrorAction SilentlyContinue
if ($pkg) { $pkg | Format-Table Name, Version }
else { Write-Host "Not detected via Get-Package; try winget list" }
Write-Host "[2/4] Backup configuration"
$backup = "C:\Backup\mattermost-$(Get-Date -Format yyyyMMdd)"
New-Item -ItemType Directory -Force $backup | Out-Null
Get-ChildItem "C:\ProgramData\Mattermost" -ErrorAction SilentlyContinue |
Copy-Item -Destination $backup -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "[3/4] Apply the upgrade to Mattermost 5.13.4.0"
winget upgrade --name "Mattermost" --silent --accept-source-agreements --accept-package-agreements
if ($LASTEXITCODE -ne 0) {
# Fallback: pull latest via OS update channel
Install-Module -Name PSWindowsUpdate -Force -SkipPublisherCheck -ErrorAction SilentlyContinue
Import-Module PSWindowsUpdate
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
}
Write-Host "[4/4] Verify the patched build"
winget list --name "Mattermost"
Write-Host "Patch applied. Reboot if prompted."
exit 0
} catch {
Write-Error "Patch failed: $_"
exit 1
} finally {
Stop-Transcript
}
Complete Bash remediation script (Linux)
#!/usr/bin/env bash
# Fix script for CVE-2026-1628 affecting Mattermost
# Detect -> backup -> upgrade -> verify -> log.
set -euo pipefail
LOG="/var/log/cve-2026-1628-fix-$(date +%Y%m%d-%H%M%S).log"
exec > >(tee -a "$LOG") 2>&1
echo "[1/4] Detect installed version"
if command -v dpkg >/dev/null; then
dpkg -s mattermost 2>/dev/null | grep -i ^Version || echo "mattermost not installed via dpkg"
elif command -v rpm >/dev/null; then
rpm -q mattermost || echo "mattermost not installed via rpm"
fi
echo "[2/4] Backup configuration"
BACKUP="/root/backup-cve-2026-1628-$(date +%Y%m%d)"
mkdir -p "$BACKUP"
for d in /etc/mattermost /etc/mattermost.d /etc/mattermost.conf; do
[ -e "$d" ] && cp -a "$d" "$BACKUP/" || true
done
echo "[3/4] Apply the upgrade (target: Mattermost 5.13.4.0)"
if command -v apt-get >/dev/null; then
apt-get update
apt-get install --only-upgrade -y mattermost
elif command -v dnf >/dev/null; then
dnf upgrade --refresh -y mattermost
elif command -v yum >/dev/null; then
yum update -y mattermost
elif command -v zypper >/dev/null; then
zypper --non-interactive update mattermost
fi
echo "[4/4] Verify the patched build"
if command -v dpkg >/dev/null; then
dpkg -s mattermost 2>/dev/null | grep -i ^Version
elif command -v rpm >/dev/null; then
rpm -q mattermost
fi
echo "Done. Restart any service that loaded the old library."
If you can't patch immediately
Apply at least one of the following inline controls until you can deploy the patched build. None replace the upgrade.
Restrict exposure with nftables (Linux)
# Allow only trusted CIDR to reach the affected service ports
sudo nft add table inet filter 2>/dev/null || true
sudo nft 'add chain inet filter input { type filter hook input priority 0 ; }' 2>/dev/null || true
sudo nft 'add rule inet filter input tcp dport {80, 443} ip saddr != 10.0.0.0/8 drop'
sudo nft list ruleset
Block at the host firewall (Windows)
New-NetFirewallRule -DisplayName "Block-CVE-2026-1628" -Direction Inbound -Action Block -Protocol TCP -LocalPort 80,443 -RemoteAddress Any -Enabled True
Get-NetFirewallRule -DisplayName "Block-CVE-2026-1628"
Disable the affected service (Linux)
sudo systemctl stop mattermost 2>/dev/null || true
sudo systemctl disable mattermost 2>/dev/null || true
If the vendor advisory lists an official workaround, prefer that wording verbatim. If no workaround is published, the only safe remediation is the patch.
How to verify the fix worked
After upgrading, confirm the installed version matches the patched build and that no old library is still loaded by a long-running process.
# Linux
dpkg -s mattermost 2>/dev/null | grep -i ^Version
rpm -q mattermost 2>/dev/null || true
# Pid map check for old library handles
sudo lsof +c0 2>/dev/null | grep -i "DEL.*lib" || true
# Windows
Get-Package -Name "*Mattermost*" | Select-Object Name, Version
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5
Expected: the reported version is at or above Mattermost 5.13.4.0. Restart the affected service (systemctl restart <service> on Linux, or restart the Windows service) so it loads the patched binary.
Frequently asked questions
Related fixes
Other vulnerabilities in the same area that are worth patching alongside this one:
- How to Fix CVE-2026-7030: Buffer Overflow in F456 — Buffer Overflow in F456
- How to Fix CVE-2026-34926: Relative Path Traversal in TrendAI Apex One — Relative Path Traversal in TrendAI Apex One
- How to Fix CVE-2026-33633: Path Traversal in kitty , Path Traversal in kitty
- How to Fix CVE-2026-8415: Cross-Site Request Forgery in Concrete CMS , Cross-Site Request Forgery in Concrete CMS
- How to Fix CVE-2026-45229: Critical Vulnerability in quark-auto-save , Critical Vulnerability in quark-auto-save
Is CVE-2026-1628 actively exploited?
There is no public confirmation of exploitation in the wild listed in CISA KEV at the time of this writing. Patch anyway. Public exploits commonly follow disclosure within weeks.
Do I need to reboot after patching CVE-2026-1628?
For kernel and OS-level updates, yes. For most userland packages a systemctl restart <service> is enough on Linux, and restarting the Windows service or app on Windows. Any process that loaded the old library keeps using it until restarted.
What is the CVSS score for CVE-2026-1628?
4.6 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N.
Where is the official advisory for CVE-2026-1628?
The vendor advisory is at https://mattermost.com/security-updates. The NVD record is at https://nvd.nist.gov/vuln/detail/CVE-2026-1628.
References
- Official vendor advisory: https://mattermost.com/security-updates
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-1628
- CISA KEV catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
*Written by Sai Kiran Pandrala. Assembled from the official vendor advisory, NVD record, and CISA KEV listing on 2026-05-25. Always confirm against the vendor's advisory before applying changes in production.*