Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 2026-05-20 - [XSS vulnerability in VerificationRequest events]
**Vulnerability:** Unescaped HTML injection in VerificationRequest message preview and display.
**Learning:** User-controlled input in matrix events was directly interpolated into HTML strings via format!.
**Prevention:** Ensure all user input is sanitized using htmlize::escape_text before being used in format strings passed to show_html.
2 changes: 1 addition & 1 deletion src/event_preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ fn text_preview_of_message(
}
MessageType::VerificationRequest(verification) => format!(
"[Verification Request] <i>to user {}</i>",
verification.to,
htmlize::escape_text(verification.to.as_str()),
),
MessageType::Video(video) => format!(
"[Video]: <i>{}</i>",
Expand Down
2 changes: 1 addition & 1 deletion src/home/room_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3377,7 +3377,7 @@ fn populate_message_view(
format: MessageFormat::Html,
body: format!(
"<i>Sent a <b>verification request</b> to {}.<br>(Supported methods: {})</i>",
verification.to,
htmlize::escape_text(verification.to.as_str()),
verification.methods
.iter()
.map(|m| m.as_str())
Expand Down
Loading