# CVE-2026-45057: matrix-sdk-ui: Incomplete edit validation

> A malicious homeserver can spoof encrypted messages by bypassing edit validation, allowing impersonation of users in Matrix clients.

- **Severity:** Medium 4.9 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Sep 2026
- **Updated:** 14 Sep 2026
- **Also known as:** GHSA-h97m-27fx-42rx, RUSTSEC-2026-0158

## What is CVE-2026-45057?

CVE-2026-45057 is a medium-severity missing authorization vulnerability in matrix-org matrix-sdk-ui, published on 11 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

matrix-sdk-ui provides GUI-centric utilities on top of matrix-rust-sdk. The message edit validation logic in the  `matrix-sdk-ui` crate prior to 0.17.0 is missing a check: when replacing an encrypted event, the replacement event itself is not required to be encrypted. This enables a malicious homeserver administrators (or actors with equivalent power) to impersonate or spoof messages as if they were sent by a victim user. `matrix-sdk-ui` 0.17.0 fixes the message edit validation logic to align with the algorithm for replacement events[^1] described in the Matrix specification. No known workarounds are available.

Weakness: CWE-345 (Insufficient Verification of Data Authenticity)

## Which versions are affected by CVE-2026-45057?

3 open source packages ship an affected version, including matrix-sdk-ui.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `matrix-sdk-ui` | crates.io | All versions | 0.16.1 |
| `matrix-sdk-ui` | crates.io | All versions | 0.16.1 |
| `matrix-sdk-ui` | crates.io | From 0.0.0-0 | 0.16.1 |

## How do I fix CVE-2026-45057?

Upgrade matrix-sdk-ui to 0.16.1 or later.

## Is CVE-2026-45057 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45057 and fix it if it is affected.

What it is: CVE-2026-45057 is a medium-severity missing authorization vulnerability in matrix-org matrix-sdk-ui, published on 11 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-45057 in the wild and no public exploit code.

Affected packages and fixed versions:
- matrix-sdk-ui (crates.io): affected all versions; fixed in 0.16.1
- matrix-sdk-ui (crates.io): affected all versions; fixed in 0.16.1
- matrix-sdk-ui (crates.io): affected from 0.0.0-0; fixed in 0.16.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-2026-45057/ (Markdown: https://insights.sbomify.com/CVE-2026-45057/index.md)
```

## Sources

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

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