Skip to content

Fetch link favicons from the site's main domain only #690

Closed

Description

@HMarzban

Summary

An AI agent can be tricked into writing a link such as https://<data>.attacker.example into a pad. Every reader's pad then asked our icon route for that origin, and the server resolved and fetched the full host. The data reached the attacker with no click. The icon route now fetches only the site's registrable domain.

  • Area: apps/hocuspocus.server/src/modules/link-metadata (domain/icon.ts, http/iconController.ts)
  • Source: hyperlink UX research, 2026-11-04 (the "Silent Egress" pattern, Feb 2026)

Details

  • The route reduces the origin to its registrable domain with tldts, by the ICANN suffix list only, before any DNS lookup. An IP passes as is.
  • Cost: a subdomain site shows its parent site's icon. For example, docs.google.com shows Google's.
  • Hosts on link cards stay in their ASCII (xn--) form, so a look-alike such as раураl.com never reads as the real site. Tests pin this (b36d1043d).
  • Known open path, left open by maintainer choice (2026-11-04): an agent can still write an outside picture, video or audio into a pad. Each reader's browser then loads it, with the full URL and the reader's IP.
  • Also open: a hover still sends a link's full URL through /api/metadata. That needs a user action.

Built in 3cd82dc2a on local main, not pushed yet.

Done when

  • Pushed and deployed.

Related

#242, #517, #682

Activity

  1. added this to the v2.3.0 milestone on Nov 4, 2026
  2. added
    Editor
    Security
    on Nov 4, 2026
  3. HMarzban commented on Nov 4, 2026

    @HMarzban
    CollaboratorAuthor

    Closed, 2026-11-04. 3cd82dc2a and b36d1043d are on main, and deploy run 41854096960 shipped them. The production check on 2026-11-04 confirmed that the icon route fetches only the registrable domain. Outside media written by agents stays open by choice in #695.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EditorSecurity

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions