CVE-2022-36009 Incorrect parsing of access level in gomatrixserverlib and dendrite

Medium 5.0 Published Updated

Incorrect power level parsing in gomatrixserverlib allows unauthorized event posting or rejection in Matrix rooms with non-default settings.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-36009?

CVE-2022-36009 is a medium-severity missing authorization vulnerability in matrix-org gomatrixserverlib, published on 19 Aug 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

gomatrixserverlib is a Go library for matrix protocol federation. Dendrite is a Matrix homeserver written in Go, an alternative to Synapse. 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. Power levels are the matrix terminology for user access level. 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. gomatrixserverlib contains a fix as of commit `723fd49` and Dendrite 0.9.3 has been updated accordingly. Matrix rooms where the `"events_default"` power level has not been changed from the default of zero are not vulnerable. Users are advised to upgrade. There are no known workarounds for this issue.

Weakness: CWE-863

Which versions are affected by CVE-2022-36009?

5 open source packages ship an affected version, including github.com/matrix-org/gomatrixserverlib and github.com/matrix-org/dendrite. It affects 2 products.

PackageAffectedFixed in
github.com/matrix-org/gomatrixserverlib GoAll versions0.0.0-20220815091947-723fd495dde8
github.com/matrix-org/gomatrixserverlib GoAll versions0.0.0-20220815091947-723fd495dde8
github.com/matrix-org/gomatrixserverlib GoAll versions0.0.0-20220815091947-723fd495dde8
github.com/matrix-org/dendrite GoAll versions0.9.3
github.com/matrix-org/dendrite GoAll versions0.9.3

Products include Matrix Dendrite, Matrix Gomatrixserverlib.

How do I fix CVE-2022-36009?

Upgrade github.com/matrix-org/gomatrixserverlib to 0.0.0-20220815091947-723fd495dde8 or later.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2022-36009 being exploited?

There is no known exploitation of CVE-2022-36009 in the wild and no public exploit code.

Sources

Also known as GHSA-grvv-h2f9-7v9c, GO-2022-0952.

Is CVE-2022-36009 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free