{"schemaVersion":3,"id":"CVE-2022-31152","aliases":["GHSA-jhjh-776m-4765","PYSEC-2022-262","UBUNTU-CVE-2022-31152","DEBIAN-CVE-2022-31152"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2022-09-02T20:00:16.000Z","modified":"2025-04-23T17:32:15.848Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":6.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01177,"percentile":0.67163,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01177},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0115,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0115,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0115,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0115,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0115,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01177,"percentile":0.67163}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01177,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01177,"percentile":0.67163}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-703","name":"Improper Check or Handling of Exceptional Conditions","description":"The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.","type":"weakness","status":"Incomplete","abstraction":"Pillar","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/703.html"},{"id":"CWE-755","name":"Improper Handling of Exceptional Conditions","description":"The product does not handle or incorrectly handles an exceptional condition.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/755.html"}],"affected":[{"vendor":"debian","product":"matrix-synapse","name":"matrix-synapse","label":"matrix-synapse","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/matrix-synapse","purlType":"deb","versions":[{"text":"< 1.63.0-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.63.0-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"matrix-synapse","name":"matrix-synapse","label":"matrix-synapse","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/matrix-synapse","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"matrix-org","product":"synapse","name":"synapse","label":"synapse","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.62.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.62.0","eol":null,"hubHref":"/vendor/matrix-org/synapse"},{"vendor":"matrix","product":"synapse","name":"synapse","label":"synapse","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.62.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.62.0","eol":null,"hubHref":"/vendor/matrix/synapse"},{"vendor":"PyPI","product":"matrix-synapse","name":"matrix-synapse","label":"matrix-synapse","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/matrix-synapse","purlType":"pypi","versions":[{"text":"< 1.62.0rc1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.62.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.62.0rc1 | < 1.62.0","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/matrix-org/synapse/security/advisories/GHSA-jhjh-776m-4765","label":"github.com/matrix-org/synapse/security/advisories/GHSA-jhjh-776m-4765","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","REPORT","Issue Tracking","Mitigation","Third Party Advisory"]},{"url":"https://github.com/matrix-org/synapse/pull/13087","label":"github.com/matrix-org/synapse/pull/13087","hostname":"github.com","tags":["X Refsource MISC","WEB","REPORT","Issue Tracking","Patch","Third Party Advisory"]},{"url":"https://github.com/matrix-org/synapse/pull/13088","label":"github.com/matrix-org/synapse/pull/13088","hostname":"github.com","tags":["X Refsource MISC","WEB","REPORT","Issue Tracking","Patch","Third Party Advisory"]},{"url":"https://github.com/matrix-org/synapse/releases/tag/v1.62.0","label":"github.com/matrix-org/synapse/releases/tag/v1.62.0","hostname":"github.com","tags":["X Refsource MISC","WEB","REPORT","Release Notes","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31152","label":"nvd.nist.gov/vuln/detail/CVE-2022-31152","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/matrix-org/synapse/commit/d4b1c0d800eaa83c4d56a9cf17881ad362b9194b","label":"github.com/matrix-org/synapse/commit/d4b1c0d800eaa83c4d56a9cf17881ad362b9194b","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/matrix-org/synapse/commit/e16ea87d0f8c4c30cad36f85488eb1f647e640b0","label":"github.com/matrix-org/synapse/commit/e16ea87d0f8c4c30cad36f85488eb1f647e640b0","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/matrix-org/synapse","label":"github.com/matrix-org/synapse","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2022-262.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2022-262.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2022-31152","label":"ubuntu.com/security/CVE-2022-31152","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-31152","label":"www.cve.org/CVERecord?id=CVE-2022-31152","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-31152","label":"security-tracker.debian.org/tracker/CVE-2022-31152","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-09-02T20:00:16.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T17:32:15.848Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T19:13:18.542Z","stale":false,"partial":false}}