---
id: CVE-2026-5139
aliases:
  - GHSA-2g8v-grq3-hq2g
title: >-
  Mattermost doesn't enforce administrator authorization on the
  {{setDefaultInstance}} call within the {{/gitlab connect}} command handler
summary: >-
  Mattermost doesn't enforce administrator authorization on the
  {{setDefaultInstance}} call within the {{/gitlab connect}} command handler
severity: medium
cvss: 5.4
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L'
vendor: mattermost
product: github.com/mattermost/mattermost-server
ecosystem: go
affected:
  - 'github.com/mattermost/mattermost-server >= 11.7.0, < 11.7.1'
  - 'github.com/mattermost/mattermost-server >= 11.6.0, < 11.6.3'
  - 'github.com/mattermost/mattermost-server >= 11.5.0, < 11.5.6'
  - 'github.com/mattermost/mattermost-server >= 10.11.0, < 10.11.18'
patched:
  - github.com/mattermost/mattermost-server 11.7.1
  - github.com/mattermost/mattermost-server 11.6.3
  - github.com/mattermost/mattermost-server 11.5.6
  - github.com/mattermost/mattermost-server 10.11.18
published: '2026-06-22'
updated: '2026-09-15'
sourceUpdated: '2026-09-15T20:00:39.340199058Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-2g8v-grq3-hq2g'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-5139'
  - url: 'https://github.com/mattermost/mattermost'
  - url: 'https://mattermost.com/security-updates'
  - url: 'https://github.com/advisories/GHSA-2g8v-grq3-hq2g'
tags:
  - osv
  - go
  - ghsa
epss: 0.00287
epssPercentile: 0.18871
cwe:
  - CWE-862
ingestedAt: '2026-09-15T20:44:02.610Z'
---

## Overview

Mattermost versions 11.7.x <= 11.7.0, 11.6.x <= 11.6.2, 11.5.x <= 11.5.5, 10.11.x <= 10.11.17 fail to enforce administrator authorization on the {{setDefaultInstance}} call within the {{/gitlab connect}} command handler, which allows any authenticated user to overwrite the global default GitLab instance configuration via the {{/gitlab connect <instance-name>}} slash command.. Mattermost Advisory ID: MMSA-2026-00644

## Affected packages

- `github.com/mattermost/mattermost-server >= 11.7.0, < 11.7.1`
- `github.com/mattermost/mattermost-server >= 11.6.0, < 11.6.3`
- `github.com/mattermost/mattermost-server >= 11.5.0, < 11.5.6`
- `github.com/mattermost/mattermost-server >= 10.11.0, < 10.11.18`

## Remediation

Upgrade to a patched release:

- `github.com/mattermost/mattermost-server 11.7.1`
- `github.com/mattermost/mattermost-server 11.6.3`
- `github.com/mattermost/mattermost-server 11.5.6`
- `github.com/mattermost/mattermost-server 10.11.18`
