CVE-2022-36009: Github.com/matrix org/dendrite Gomatrixserverlib And Dendrite Vulnerable To Vulnerability
MODERATECVE-2022-36009 is a MODERATE (CVSS 5.0) gomatrixserverlib and dendrite vulnerable to vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/matrix org/dendrite libraries in the Go ecosystem. The issue involves gomatrixserverlib and dendrite vulnerable to incorrect parsing of the event default power level in event auth. Remediation is available by upgrading affected packages to version 0.9.3, 0.0.0-20220815091947-723fd495dde8.
CVE-2022-36009 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2022-36009
To remediate this vulnerability, upgrade all affected Github.com/matrix org/dendrite dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/matrix-org/dendrite to 0.9.3
Upgrade github.com/matrix-org/gomatrixserverlib to 0.0.0-20220815091947-723fd495dde8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/matrix-org/dendrite
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-36009, inspect your project dependencies for Github.com/matrix org/dendrite:
inspect dependencies for github.com/matrix-org/dendrite
Analyze the terminal output to locate any version of Github.com/matrix org/dendrite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/matrix org/dendrite, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-36009 Affected Github.com/matrix org/dendrite Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/matrix-org/dendrite
|
Go |
< 0.9.3
|
0.9.3
|
|
github.com/matrix-org/gomatrixserverlib
|
Go |
< 0.0.0-20220815091947-723fd495dde8
|
0.0.0-20220815091947-723fd495dde8
|
References
Frequently Asked Questions
What is CVE-2022-36009?
Which Github.com/matrix org/dendrite versions are affected?
What version fixes CVE-2022-36009?
Is github.com/matrix-org/dendrite affected?
Is github.com/matrix-org/gomatrixserverlib affected?
What is the CVSS score of CVE-2022-36009?
What CWE is associated with CVE-2022-36009?
How can I check Go dependencies for CVE-2022-36009?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-grvv-h2f9-7v9c",
"modified" : "2022-08-30T19:54:34Z",
"published" : "2022-08-30T19:54:34Z",
"aliases" : [ "CVE-2022-36009" ],
"summary" : "gomatrixserverlib and Dendrite vulnerable to incorrect parsing of the event default power level in event auth",
"details" : "### Impact\n\nThe 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.\n\nIn rooms where the `\"events_default\"` power level had been changed, this could result in events either being incorrectly authorised or rejected by Dendrite servers.\n\n### Patches\n\ngomatrixserverlib contains a fix as of commit `723fd49` and Dendrite 0.9.3 has been updated accordingly.\n\n### Workarounds\n\nMatrix rooms where the `\"events_default\"` power level has not been changed from the default of zero are not vulnerable.\n\n### For more information\n\nIf you have any questions or comments about this advisory, e-mail us at [security@matrix.org](mailto:security@matrix.org).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/matrix-org/dendrite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/matrix-org/gomatrixserverlib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20220815091947-723fd495dde8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/gomatrixserverlib/security/advisories/GHSA-grvv-h2f9-7v9c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36009"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/gomatrixserverlib/commit/723fd495dde835d078b9f2074b6b62c06dea4575"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/gomatrixserverlib"
}, {
"type" : "WEB",
"url" : "https://matrix.org/docs/guides/moderation/#power-levels"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0952"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-08-30T19:54:34Z",
"nvd_published_at" : "2022-08-19T21:15:00Z"
}
}