jhass / nodeinfo

NodeInfo defines a standardized way to expose metadata about an installation of a distributed social network
http://nodeinfo.diaspora.software
101 stars 22 forks source link

Servers can redirect/link to NodeInfos on entirely different servers #63

Open braedon opened 1 year ago

braedon commented 1 year ago

The protocol states that when fetching /.well-known/nodeinfo clients should follow redirects, but doesn't provide any restrictions on the domain/origin redirected to.

Similarly, the JRD document at /.well-known/nodeinfo can link to a NodeInfo document at any location, with no restrictions on domain/origin.

This allows servers to trivially reference NodeInfo documents for entirely different servers, providing erroneous metadata.

I've found 4 cases in the last 2 months where people have tried to set up aliases from their own domain to Mastodon accounts on other servers, and accidentally ended up referencing mastodon.social's NodeInfo from their domain. As the NodeInfo protocol stands, that "gave" those domains all the metadata of mastodon.social, e.g. user count.

The obvious way to solve this would be to restrict redirects and links to the same origin, or domain, or site (depending on how strict you wanted/needed to be).