{"id":"CVE-2021-21394","aliases":["CVE-2021-21394","GHSA-w9fg-xffh-p362","PYSEC-2021-27"],"related":[],"kind":"vulnerability","state":"published","title":"Denial of service (via resource exhaustion) due to improper input validation on third-party identifier endpoints","summary":"Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Matrix is an ecosystem for open federated Instant Messaging and VoIP. In Synapse before version 1.28.0 Synapse is missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion. Note that the groups feature is not part of the Matrix specification and the chosen maximum lengths are arbitrary. Not all clients might abide by them. Refer to referenced GitHub security advisory for additional details including workarounds.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Synapse is a Matrix reference homeserver written in python (pypi package matrix-synapse). Matrix is an ecosystem for open federated Instant Messaging and VoIP. In Synapse before version 1.28.0 Synapse is missing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion. Note that the groups feature is not part of the Matrix specification and the chosen maximum lengths are arbitrary. Not all clients might abide by them. Refer to referenced GitHub security advisory for additional details including workarounds.","source":"cvelist"},{"lang":"en","text":"### Impact\nMissing input validation of some parameters on the endpoints used to confirm third-party identifiers could cause excessive use of disk space and memory leading to resource exhaustion.\n\n### Patches\nThe issue is fixed by #9321.\n\n### Workarounds\nDepending on the needs and configuration of the homeserver a few options are available:\n\n1. Using email as third-party identifiers be disabled by not configuring the `email` setting.\n2. Using phone numbers as third-party identifiers can be disabled by ensuring that `account_threepid_delegates.msisdn` is not configured.\n3. Additionally, the affected endpoint patterns can be blocked at a reverse proxy:\n\n    * `^/_matrix/client/(r0|unstable)/register/email`\n    * `^/_matrix/client/(r0|unstable)/register/msisdn`\n    * `^/_matrix/client/(r0|unstable)/account/password`\n    * `^/_matrix/client/(r0|unstable)/account/3pid`","format":"markdown","source":"ghsa"},{"lang":"es","text":"Synapse es un servidor doméstico de referencia de Matrix escrito en python (paquete pypi matrix-synapse).&#xa0;Matrix es un ecosistema para Mensajería Instantánea y Volp federada abierta.&#xa0;En Synapse anterior a versión 1.28.0 Synapse presenta una falta de comprobación de entrada de algunos parámetros en los endpoints utilizados para confirmar que identificadores de terceros podrían causar un uso excesivo del espacio en disco y la memoria conllevando a un agotamiento de los recursos.&#xa0;Tome en cuenta que la funcionalidad de grupos no forma parte de la especificación de Matrix y que las longitudes máximas elegidas son arbitrarias.&#xa0;No todos los clientes pueden acatarlos.&#xa0;Consulte el aviso de seguridad de GitHub al que se hace referencia para obtener detalles adicionales, incluyendo las soluciones","source":"nvd"}],"published":"2021-04-12T20:45:18.000Z","modified":"2026-07-08T06:30:03.309Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:N/I:N/A:P","score":4,"rating":"MEDIUM"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 1.28.0","status":"affected"}],"vendor":"matrix-org","product":"synapse","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.28.0"}],"ecosystem":"PyPI","package":"matrix-synapse","purl":"pkg:pypi/matrix-synapse","source":"ghsa"},{"ranges":[{"status":"affected","introduced":">0.17.0","fixed":"1.28.0"}],"vendor":"matrix","product":"synapse","cpe":"cpe:2.3:a:matrix:synapse:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.28.0"}],"ecosystem":"PyPI","package":"matrix-synapse","purl":"pkg:pypi/matrix-synapse","source":"pysec"}],"references":[{"url":"https://github.com/matrix-org/synapse/security/advisories/GHSA-w9fg-xffh-p362","tags":["advisory","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://pypi.org/project/matrix-synapse/","tags":["package","product","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://github.com/matrix-org/synapse/pull/9321","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/matrix-org/synapse/pull/9393","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21394","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/matrix-org/synapse","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2021-27.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TNNAJOZNMVMXM6AS7RFFKB4QLUJ4IFEY","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/matrix-synapse","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-21394","url":"https://www.cve.org/CVERecord?id=CVE-2021-21394","licence":"CVE Terms of Use","modified":"2024-08-03T18:09:16.108Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w9fg-xffh-p362","url":"https://github.com/advisories/GHSA-w9fg-xffh-p362","licence":"CC-BY-4.0","modified":"2026-07-08T06:30:03.309Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-21394","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21394","licence":"Public domain","modified":"2026-06-17T03:35:28.900Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-27","url":"https://osv.dev/vulnerability/PYSEC-2021-27","licence":"CC-BY-4.0","modified":"2023-11-08T04:04:44.473Z"}],"updatedAt":"2026-11-25T22:58:00.720Z","epss":{"score":0.01538,"percentile":0.75618,"date":"2026-12-01T12:00:22.000Z"}}