gomatrixserverlib and Dendrite vulnerable to incorrect parsing of the event default power level in event auth

Description

Impact

The power level parsing within gomatrixserverlib was failing to parse the "events_default" key of the m.room.power_levels event, defaulting the event default power level to zero in all cases.

In rooms where the "events_default" power level had been changed, this could result in events either being incorrectly authorised or rejected by Dendrite servers.

Patches

gomatrixserverlib contains a fix as of commit 723fd49 and Dendrite 0.9.3 has been updated accordingly.

Workarounds

Matrix rooms where the "events_default" power level has not been changed from the default of zero are not vulnerable.

For more information

If you have any questions or comments about this advisory, e-mail us at [email protected].

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2022-08-30 19:54:34 UTC
Updated
2023-02-09 21:08:13 UTC
GitHub reviewed
2022-08-30 19:54:34 UTC
NVD published
2022-08-19

EPSS Score

Score Percentile
0.62% 69.51%

CVSS Scores

Base score Version Severity Vector
5.0 3.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-863 Incorrect Authorization

Affected packages (2)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
go github.com/matrix-org/dendrite < 0.9.3 0.9.3
go github.com/matrix-org/gomatrixserverlib < 0.0.0-20220815091947-723fd495dde8 0.0.0-20220815091947-723fd495dde8

References

cvelogic Threat Intelligence