{"answers":{"affected":"3 open source packages ship an affected version, including matrix-synapse. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31152 in the wild and no public exploit code.","fix":"Upgrade matrix-synapse to a fixed version for your release line: 1.62.0 or 1.62.0rc1.","what":"CVE-2022-31152 is a medium-severity denial of service vulnerability in matrix-org synapse, published on 2 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31152 and fix it if it is affected.\n\nWhat it is: CVE-2022-31152 is a medium-severity denial of service vulnerability in matrix-org synapse, published on 2 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31152 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- matrix-synapse (PyPI): affected all versions; fixed in 1.62.0\n- matrix-synapse (PyPI): affected all versions; fixed in 1.62.0rc1\n- matrix-synapse (PyPI): affected all versions; fixed in 1.62.0rc1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31152/ (Markdown: https://insights.sbomify.com/CVE-2022-31152/index.md)","id":"CVE-2022-31152","markdown":"https://insights.sbomify.com/CVE-2022-31152/index.md","name":"CVE-2022-31152","record":{"aliases":["GHSA-jhjh-776m-4765","PYSEC-2022-262","UBUNTU-CVE-2022-31152"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Matrix homeserver","requires_auth":"low_privilege","summary":"Attackers can cause room state divergence and denial of service in Synapse homeservers with federation enabled by exploiting incorrect event authorization rules.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"synapse","vendor":"matrix"}],"cvss":{"score":6.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-755","name":"Improper Handling of Exceptional Conditions"},{"id":"CWE-703","name":"Improper Check or Handling of Exceptional Conditions"}],"description":"Synapse is an open-source Matrix homeserver written and maintained by the Matrix.org Foundation. The Matrix specification specifies a list of [event authorization rules](https://spec.matrix.org/v1.2/rooms/v9/#authorization-rules) which must be checked when determining if an event should be accepted into a room. In versions of Synapse up to and including version 1.61.0, some of these rules are not correctly applied. An attacker could craft events which would be accepted by Synapse but not a spec-conformant server, potentially causing divergence in the room state between servers. Administrators of homeservers with federation enabled are advised to upgrade to version 1.62.0 or higher. Federation can be disabled by setting [`federation_domain_whitelist`](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#federation_domain_whitelist) to an empty list (`[]`) as a workaround.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Synapse vulnerable to denial of service (DoS) due to incorrect application of event authorization rules","id":"CVE-2022-31152","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":3,"n_references":4,"next":{"headline":"OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli","id":"CVE-2022-31153"},"packages":[{"ecosystem":"PyPI","fixed":["1.62.0"],"introduced":["0"],"last_affected":[],"package":"matrix-synapse","purl":"pkg:pypi/matrix-synapse","source":"PYSEC-2022-262"},{"ecosystem":"PyPI","fixed":["1.62.0rc1"],"introduced":["0"],"last_affected":[],"package":"matrix-synapse","purl":null,"source":"GHSA-jhjh-776m-4765"},{"ecosystem":"PyPI","fixed":["1.62.0rc1"],"introduced":["0"],"last_affected":[],"package":"matrix-synapse","purl":"pkg:pypi/matrix-synapse","source":"GHSA-jhjh-776m-4765"}],"prev":{"headline":"Uncleared cookies on cross-host/cross-origin redirect in undici","id":"CVE-2022-31151"},"products":["synapse"],"published":"2022-09-02","related":[{"cvss_score":9.8,"headline":"Improper Verification of Cryptographic Signature in matrix-synapse","id":"CVE-2019-18835","kev_date_added":null,"published":"2019-11-07"},{"cvss_score":8.7,"headline":"Synapse allows a a malformed invite to break the invitee's `/sync`","id":"CVE-2024-52815","kev_date_added":null,"published":"2024-12-03"},{"cvss_score":8.2,"headline":"Synapse allows unsupported content types to lead to memory exhaustion","id":"CVE-2024-52805","kev_date_added":null,"published":"2024-12-03"},{"cvss_score":8.2,"headline":"Synapse can be forced to thumbnail unexpected file formats, invoking external, potentially untrustworthy decoders","id":"CVE-2024-53863","kev_date_added":null,"published":"2024-12-03"},{"cvss_score":7.5,"headline":"Synapse denial of service through media disk space consumption","id":"CVE-2024-37302","kev_date_added":null,"published":"2024-12-03"},{"cvss_score":7.5,"headline":"Matrix Synapse Authorization Error","id":"CVE-2018-12423","kev_date_added":null,"published":"2018-06-14"},{"cvss_score":7.5,"headline":"Matrix Synapse Security Filtering Flaw","id":"CVE-2018-12291","kev_date_added":null,"published":"2018-06-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["matrix-org"]},"summary":"Attackers can cause room state divergence and denial of service in Synapse homeservers with federation enabled by exploiting incorrect event authorization rules.","url":"https://insights.sbomify.com/CVE-2022-31152/"}