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

- Severity: Medium 4.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-06-03T12:00:00.000Z
- Modified: 2026-10-12T18:00:14.300Z
- Also known as: GHSA-h97m-27fx-42rx, RUSTSEC-2026-0158
- Weaknesses: CWE-345
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- matrix-org matrix-sdk-ui: < 0.16.1
- matrix-sdk-ui (crates.io): before 0.16.1; from 0.0.0-0 before 0.16.1

## Every score

- GitHub_M: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`
- RustSec Advisory Database: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-h97m-27fx-42rx> (web)
- <https://github.com/matrix-org/matrix-rust-sdk/pull/6454> (web)
- <https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.16.1> (web)
- <https://rustsec.org/advisories/RUSTSEC-2026-0158.html> (advisory, web)
- <https://github.com/matrix-org/matrix-rust-sdk> (package)
- <https://crates.io/crates/matrix-sdk-ui> (package)

## Sources

- CVE List: [CVE-2026-45057](https://www.cve.org/CVERecord?id=CVE-2026-45057), CVE Terms of Use, modified 2026-09-14
- GitHub Advisory Database: [GHSA-h97m-27fx-42rx](https://github.com/advisories/GHSA-h97m-27fx-42rx), CC-BY-4.0, modified 2026-06-04
- RustSec Advisory Database: [RUSTSEC-2026-0158](https://rustsec.org/advisories/RUSTSEC-2026-0158.html), CC0-1.0, modified 2026-10-12
- NVD: [CVE-2026-45057](https://nvd.nist.gov/vuln/detail/CVE-2026-45057), Public domain, modified 2026-09-30

---

Page: https://cve.day/CVE-2026-45057 · Whole record: https://cve.day/CVE-2026-45057.json · Rebuilt by cve.day 2026-11-25T22:59:38.147Z
