Miggo Logo

CVE-2023-31143: Mage-ai missing user authentication

5.9

CVSS Score
3.1

Basic Information

EPSS Score
0.3078%
Published
5/5/2023
Updated
9/30/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
mage-aipip>= 0.8.34, < 0.8.720.8.72

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from two key functions in the terminal WebSocket handler:

  1. In 'TermSocket.open', authentication was partially implemented but lacked role validation and proper error handling for invalid tokens.
  2. The missing 'on_message' override allowed command processing without authentication. The patch added this method with explicit auth checks, confirming these were the vulnerable points. The frontend changes to include auth data in messages further corroborate that the server-side message handling was previously unauthenticated.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t You m*y ** imp**t** i* you'r* usin* M*** wit* us*r *ut**nti**tion *n**l**. T** t*rmin*l *oul* ** ****ss** *y us*rs w*o *r* not si*n** in or *o not **v* **itor p*rmissions. ### P*t***s T** vuln*r**ility **s ***n r*solv** in M*** v*rsion

Reasoning

T** vuln*r**ility st*mm** *rom two k*y *un*tions in t** t*rmin*l W**So*k*t **n*l*r: *. In 'T*rmSo*k*t.op*n', *ut**nti**tion w*s p*rti*lly impl*m*nt** *ut l**k** rol* v*li**tion *n* prop*r *rror **n*lin* *or inv*li* tok*ns. *. T** missin* 'on_m*ss***'