Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[security] Clicking relative links on IPNS: protocol sites can spoof the address field path, or unexpectedly downgrades to HTTP at ipns.localhost pseudo-origin #18809

Open
da2x opened this issue Oct 15, 2021 · 0 comments

Comments

@da2x
Copy link

da2x commented Oct 15, 2021

Description

This bug contains two very similar bugs, so there are two sets of steps to reproduce and expected/actual results. I deemed it highly likely that these are caused by the same issue and would be best processed together.

Prerequisites

  1. Visit brave://ipfs-internals and enable and install a local IPFS node.

Bug 1. address field path doesn’t update

Steps to Reproduce

  1. Go to ipns://ipfs.io/team
  2. Click on the IPFS project logo on the far left (a relative link to '/').

Actual result:

Address field still shows:

ipns://ipfs.io/team

Expected result:

Address field should show:

ipns://ipfs.io/

Bug 2. changes origin and protocol

Steps to Reproduce

  1. Go to ipns://randomplanetfacts.xyz/
  2. Click on the About link (a relative link to about.html)

Actual result:

Address field shows:

http://randomplanetfacts.xyz.ipns.localhost:48084/about.html

The address field shows the “Open using IPFS” button.

Expected result:

Address field should show:

ipns://randomplanetfacts.xyz/about.html

Reproduces how often:

Every time.

Brave version (brave://version info)

Brave | 1.30.89 Chromium: 94.0.4606.81 (Official Build) (64-bit)
Revision | 5a03c5f1033171d5ee1671d219a59e29cf75e054-refs/branch-heads/4606@{#1320}
OS | Windows 11 Version 21H2 (Build 22000.258)

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the nightly channel?

Other Additional Information:

Related to #13303.

Miscellaneous Information:

Reporting publicly despite qualifying as a security bug (address field spoofing) as IPFS is still such an experimental technology, and it’s not like anyone does their banking on IPFS.

I don’t understand why the two sites behave differently.

@spylogsster spylogsster self-assigned this Nov 2, 2021
@spylogsster spylogsster removed their assignment Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants