{"id":"CVE-2026-45057","aliases":["RUSTSEC-2026-0158"],"url":"https://o3.security/vulnerability/CVE-2026-45057","summary":"matrix-sdk-ui: Incomplete edit validation","details":"### Impact\nThe message edit validation logic in the  `matrix-sdk-ui` crate before 0.16.1 is missing a check: when replacing an encrypted event, the replacement event itself is not required to be encrypted. This enables a malicious homeserver administrator (or an actor with equivalent power) to impersonate or spoof messages as if they were sent by a victim user.\n\n### Patches\n`matrix-sdk-ui` 0.16.1 fixes the message edit validation logic to align with the algorithm for replacement events[^1] described in the Matrix specification.\n\n### Workarounds\nN/A\n\n### References\n* Pull request: https://github.com/matrix-org/matrix-rust-sdk/pull/6454\n\n### For more information\nIf you have any questions or comments about this advisory, please email us at [security at matrix.org](mailto:security@matrix.org).\n\n[^1]: https://spec.matrix.org/unstable/client-server-api/#validity-of-replacement-events","published":"2026-06-04T14:50:47Z","modified":"2026-06-04T15:00:08.147473159Z","cvss":{"score":4.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"crates.io","name":"matrix-sdk-ui","fixedVersion":"0.16.1"}],"fix":{"url":"https://github.com/matrix-org/matrix-rust-sdk/pull/6454","label":"matrix-org/matrix-rust-sdk#6454"},"references":[{"type":"WEB","url":"https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-h97m-27fx-42rx"},{"type":"WEB","url":"https://github.com/matrix-org/matrix-rust-sdk/pull/6454"},{"type":"PACKAGE","url":"https://github.com/matrix-org/matrix-rust-sdk"},{"type":"WEB","url":"https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.16.1"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2026-0158.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-06-04T15:00:08.147473159Z"}}