Miggo Logo

CVE-2023-5969: Mattermost vulnerable to excessive memory consumption

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.3016%
Published
11/6/2023
Updated
11/23/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/mattermost/mattermost-server/v6go< 7.8.127.8.12
github.com/mattermost/mattermost/server/v8go>= 8.0.0, < 8.0.48.0.4
github.com/mattermost/mattermost/server/v8go>= 8.1.0, < 8.1.38.1.3
github.com/mattermost/mattermost/server/v8go= 9.0.09.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the lack of validation on the length of the 'Location' header in the getRedirectLocation function. The pre-patch code cached any returned 'Location' value (even very large ones) via redirectLocationDataCache.SetWithExpiry, allowing memory exhaustion. The fix introduced RedirectLocationMaximumLength to reject oversized locations, confirming the absence of this check in the original function was the flaw.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

M*tt*rmost **ils to prop*rly s*nitiz* t** r*qu*st to `/*pi/v*/r**ir**t_lo**tion` *llowin* *n *tt**k*r, s*n*in* * sp**i*lly *r**t** r*qu*st to `/*pi/v*/r**ir**t_lo**tion`, to *ill up t** m*mory *u* to ****in* l*r** it*ms.

Reasoning

T** vuln*r**ility st*ms *rom t** l**k o* v*li**tion on t** l*n*t* o* t** 'Lo**tion' *****r in t** **tR**ir**tLo**tion *un*tion. T** pr*-p*t** *o** ****** *ny r*turn** 'Lo**tion' v*lu* (*v*n v*ry l*r** on*s) vi* r**ir**tLo**tion**t******.S*tWit**xpiry