Miggo Logo

CVE-2024-39691:
Malicious Matrix homeserver can leak truncated message content of messages it shouldn't have access to

4.3

CVSS Score
3.1

Basic Information

EPSS Score
0.13098%
Published
7/5/2024
Updated
7/5/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
matrix-appservice-ircnpm<= 2.0.02.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from using event.origin_server_ts (controlled by external homeservers) to determine message visibility in member join tracking. The commit diff shows this timestamp was replaced with Date.now() in MatrixHandler.ts's _onMemberEvent method, indicating this was the vulnerable function. The function's reliance on untrusted input for security decisions directly matches the CWE-280 (Improper Permission Handling) described in the advisory.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** *ix *or **S*-wm*w-***q-*p** / [*V*-****-*****](*ttps://www.*v*.or*/*V*R**or*?i*=*V*-****-*****) in*lu*** in m*trix-*pps*rvi**-ir* *.*.* r*li** on t** M*trix *om*s*rv*r-provi*** tim*st*mp to **t*rmin* w**t**r * us*r **s ****ss to t** *

Reasoning

T** vuln*r**ility st*mm** *rom usin* *v*nt.ori*in_s*rv*r_ts (*ontroll** *y *xt*rn*l *om*s*rv*rs) to **t*rmin* m*ss*** visi*ility in m*m**r join tr**kin*. T** *ommit *i** s*ows t*is tim*st*mp w*s r*pl**** wit* **t*.now() in M*trix**n*l*r.ts's _onM*m**