The 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.
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/A
If you have any questions or comments about this advisory, please email us at security at matrix.org.
{
"cwe_ids": [
"CWE-345"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-04T14:50:47Z",
"nvd_published_at": null,
"severity": "MODERATE"
}