Miggo Logo

CVE-2024-4198: Mattermost fails to fully validate role changes

2.7

CVSS Score
3.1

Basic Information

EPSS Score
0.33937%
Published
4/26/2024
Updated
4/26/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/mattermost/mattermost-servergo>= 9.6.0-rc1, <= 9.6.09.6.1
github.com/mattermost/mattermost-servergo>= 9.5.0, <= 9.5.29.5.3
github.com/mattermost/mattermost-servergo>= 8.1.0, <= 8.1.118.1.12

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper access control in role validation. The commit diff shows critical changes in UpdateTeamMemberSchemeRoles where:

  1. Previous checks for guest+user and guest+admin conflicts were removed
  2. A new check rejecting ANY SchemeGuest assignment was added
  3. Error messages were updated to indicate guest role changes require system admin
  4. Test cases were added to verify blocking guest role changes via team API This function was the entry point for team member role updates and lacked proper authorization checks for guest role assignments, allowing team admins to bypass intended restrictions.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

M*tt*rmost v*rsions *.*.*, *.*.x ***or* *.*.*, *n* *.*.x ***or* *.*.** **il to *ully v*li**t* rol* ***n**s w*i** *llows *n *tt**k*r *ut**nti**t** *s t**m **min to **mot* us*rs to *u*st vi* *r**t** *TTP r*qu*sts.

Reasoning

T** vuln*r**ility st*ms *rom improp*r ****ss *ontrol in rol* v*li**tion. T** *ommit *i** s*ows *riti**l ***n**s in Up**t*T**mM*m**rS***m*Rol*s w**r*: *. Pr*vious ****ks *or *u*st+us*r *n* *u*st+**min *on*li*ts w*r* r*mov** *. * n*w ****k r*j**tin* *N