CVE-2022-36009
gomatrixserverlib and Dendrite vulnerable to incorrect parsing of the event default power level in event auth
Impact
### 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 [security@matrix.org](mailto:security@matrix.org).
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| 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 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Matrix | Dendrite | through 0.9.2 |
| Matrix | Gomatrixserverlib | All versions |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/matrix-org/gomatrixserverlib/commit/723fd495dde835d078b9f2074b6b62c06dea4575
- https://github.com/matrix-org/gomatrixserverlib/security/advisories/GHSA-grvv-h2f9-7v9c
- https://matrix.org/docs/guides/moderation/#power-levels
- https://github.com/advisories/GHSA-grvv-h2f9-7v9c
- https://nvd.nist.gov/vuln/detail/CVE-2022-36009
- https://pkg.go.dev/vuln/GO-2022-0952