CVE-2022-39335

CVE-2022-39335 is a high-severity missing authorization vulnerability in matrix-synapse (pip), affecting versions < 1.69.0. It is fixed in 1.69.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Synapse does not apply enough checks to servers requesting auth events of events in a room

Workarounds

Synapse can be configured with a list of servers that it is allowed to federate with federation_domain_whitelist. If this list is in use and all the servers on the list are trusted not to exploit this issue, then this issue is of no consequence.

This workaround is not practical for homeservers participating in open federation as interaction with any server not on the list would have to happen indirectly through servers that are, leading to inconsistent delays in message delivery.

References

Fixed in https://github.com/matrix-org/synapse/pull/13823.

For more information

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

Impact

Synapse is an open-source Matrix homeserver written and maintained by the Matrix.org Foundation. The Matrix Federation API allows remote homeservers to request the authorisation events of events in a room. This is necessary so that a homeserver receiving some events can validate that those events are legitimate and permitted in their room.
However, in versions of Synapse up to and including 1.68.0, a Synapse homeserver answering a query for authorisation events does not sufficiently check that the requesting server should be able to access them.

Authorisation events include power level events (the list of user IDs and their power levels at the time) and relevant membership events (including the display name of the sender of that event), as well as events like m.room.create, m.room.third_party_invite and m.room.join_rules. Non-authorisation events are unaffected, so it isn't possible to e.g. extract message contents this way.

This issue is only exploitable when a malicious actor knows the ID of a target room and the ID of an event from that room. In most cases, this makes exploitation infeasible. This issue is of negligible consequence for public rooms given that any server can easily join the room in order to be allowed to view authorisation events. Further, deployments in a closed federation where all homeservers are trustworthy are not affected.

The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.

CVE-2022-39335 has a CVSS score of 5.0 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.69.0); upgrading removes the vulnerable code path.

Affected versions

matrix-synapse (< 1.69.0)

Security releases

matrix-synapse → 1.69.0 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The issue was patched in Synapse 1.69.0. Homeserver administrators are advised to upgrade.

Frequently Asked Questions

  1. What is CVE-2022-39335? CVE-2022-39335 is a high-severity missing authorization vulnerability in matrix-synapse (pip), affecting versions < 1.69.0. It is fixed in 1.69.0. The application does not perform an authorization check before performing a sensitive operation.
  2. How severe is CVE-2022-39335? CVE-2022-39335 has a CVSS score of 5.0 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of matrix-synapse are affected by CVE-2022-39335? matrix-synapse (pip) versions < 1.69.0 is affected.
  4. Is there a fix for CVE-2022-39335? Yes. CVE-2022-39335 is fixed in 1.69.0. Upgrade to this version or later.
  5. Is CVE-2022-39335 exploitable, and should I be worried? Whether CVE-2022-39335 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2022-39335 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2022-39335? Upgrade matrix-synapse to 1.69.0 or later.

Other vulnerabilities in matrix-synapse

Stop the waste.
Protect your environment with Kodem.