A link whose text names a different site still gets a genuine preview card for the site it pretends to be #286

Closed
opened 2026-10-04 19:50:21 -04:00 by jared · 0 comments
Owner

A message whose HTML link reads https://paypal.com but points to https://evil.example/login is caught by the #122 confirmation when clicked ("This link doesn't go where it says"). But the message also gets a real PayPal preview card (screenshot), which makes the fake link look more trustworthy.

Why: URL previews are generated from the plain-text body (trimmedBody.match(URL_REG), src/app/components/message/MsgTypeRenderers.tsx:331/389/446). Clicks follow the href in formatted_body. A sender controls both independently.

Fix: when formatted_body exists, build previews from its hrefs, and skip the preview for any link that linkSafety flags as mismatched (or show the preview for the real destination).

Screenshot

F29-deceptive-preview.png


Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny 30e2dbcd, cinny-desktop 8f67ec7, element-call 3b0050e8.

A message whose HTML link reads `https://paypal.com` but points to `https://evil.example/login` is caught by the #122 confirmation when clicked ("This link doesn't go where it says"). But the message also gets a **real PayPal preview card** (screenshot), which makes the fake link look more trustworthy. **Why:** URL previews are generated from the plain-text `body` (`trimmedBody.match(URL_REG)`, src/app/components/message/MsgTypeRenderers.tsx:331/389/446). Clicks follow the `href` in `formatted_body`. A sender controls both independently. **Fix:** when `formatted_body` exists, build previews from its `href`s, and skip the preview for any link that `linkSafety` flags as mismatched (or show the preview for the real destination). **Screenshot** ![F29-deceptive-preview.png](https://code.lotusguild.org/attachments/e018b3c0-4a80-473f-aaf5-50991164634a) --- _Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny `30e2dbcd`, cinny-desktop `8f67ec7`, element-call `3b0050e8`._
jared added the priority: lowsecurityarea: messaging labels 2026-10-04 19:50:21 -04:00
jared closed this issue 2026-10-18 06:15:47 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#286