# CVE-2025-61672: Synapse: Invalid device keys degrade federation functionality

> An attacker can degrade federation functionality by submitting invalid device keys, breaking outbound connections to other homeservers.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Oct 2025
- **Updated:** 15 Oct 2025
- **Also known as:** GHSA-fh66-fcv5-jjfr, PYSEC-2026-1612, UBUNTU-CVE-2025-61672, openSUSE-SU-2025:15603-1

## What is CVE-2025-61672?

CVE-2025-61672 is a medium-severity denial of service vulnerability in element-hq synapse, published on 8 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Synapse is an open source Matrix homeserver implementation. Lack of validation for device keys in Synapse before 1.138.3 and in Synapse 1.139.0 allow an attacker registered on the victim homeserver to degrade federation functionality, unpredictably breaking outbound federation to other homeservers. The issue is patched in Synapse 1.138.3, 1.138.4, 1.139.1, and 1.139.2. Note that even though 1.138.3 and 1.139.1 fix the vulnerability, they inadvertently introduced an unrelated regression. For this reason, the maintainers of Synapse recommend skipping these releases and upgrading straight to 1.138.4 and 1.139.2.

Weakness: CWE-1287 (Improper Validation of Specified Type of Input)

## Which versions are affected by CVE-2025-61672?

5 open source packages ship an affected version, including matrix-synapse.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `matrix-synapse` | PyPI | All versions | 1.138.3, 1.139.1 |
| `matrix-synapse` | PyPI | All versions | 1.138.3 |
| `matrix-synapse` | PyPI | All versions | 1.138.3 |
| `matrix-synapse` | PyPI | From 1.139.0rc2 | 1.139.1 |
| `matrix-synapse` | PyPI | From 1.139.0rc2 | 1.139.1 |
| `matrix-synapse` | openSUSE:Tumbleweed | All versions | 1.139.1-1.1 |

## How do I fix CVE-2025-61672?

Upgrade matrix-synapse to a fixed version for your release line: 1.138.3 or 1.139.1.

## Is CVE-2025-61672 being exploited?

There is no known exploitation of CVE-2025-61672 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-61672 and fix it if it is affected.

What it is: CVE-2025-61672 is a medium-severity denial of service vulnerability in element-hq synapse, published on 8 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-61672 in the wild and no public exploit code.

Affected packages and fixed versions:
- matrix-synapse (PyPI): affected all versions; fixed in 1.138.3, 1.139.1
- matrix-synapse (PyPI): affected all versions; fixed in 1.138.3
- matrix-synapse (PyPI): affected all versions; fixed in 1.138.3
- matrix-synapse (PyPI): affected from 1.139.0rc2; fixed in 1.139.1
- matrix-synapse (PyPI): affected from 1.139.0rc2; fixed in 1.139.1

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-61672/ (Markdown: https://insights.sbomify.com/CVE-2025-61672/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-61672
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-61672
- OSV: https://osv.dev/vulnerability/CVE-2025-61672

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-61672/
Summaries are generated and may contain mistakes; the official description above is the record.
